Payload Workbench
A browser-local workbench for formatting JSON, converting between JSON and YAML, and encoding or decoding Base64. Paste a payload, pick a transform, and get deterministic output — with explicit errors that tell you exactly where a payload is malformed.
Workbench
JSON transforms need valid JSON. YAML transforms accept YAML 1.2 core scalars, lists, and mappings. Base64 decode expects UTF-8 text.
Paste JSON, YAML, or Base64 text. Input size is limited only by this tab's memory.
Output
When do you need to format or convert a payload?
JSON, YAML, and Base64 show up in almost every developer workflow — usually in a form that is awkward to read or that another tool refuses to accept. Four situations come up most often:
- Debugging an API response. Logs, network tabs, and error reports usually show JSON on one long line. Formatting it with two-space indentation turns a 110-character wall of text into a readable tree, and minifying does the opposite when you need a compact single line to paste into a URL or a test case.
- Preparing configuration files. Docker Compose, CI pipelines, and many deployment tools expect YAML, while other systems — cloud CLIs, some SDKs, API request bodies — only accept JSON. Converting in the right direction keeps the file consistent instead of hand-editing indentation.
- Validating a payload before it enters a pipeline. When another tool reports “invalid JSON” without saying where, this page's strict parser names the exact line and column of the first problem — and it rejects malformed YAML and non-UTF-8 Base64 the same way.
- Moving small text through character-safe channels. Base64 encoding lets you embed text in URLs, headers, and emails that would otherwise mangle Unicode; decoding lets you inspect what is actually inside an encoded string before you trust it.
A worked example, step by step
Suppose an API returns this single-line JSON, and you need to read it, convert it for a YAML-based tool, and prove nothing was lost:
{"user":{"id":42,"name":"Aisha","roles":["admin","editor"],"active":true},"meta":{"source":"api","retries":0}}
- Paste it and choose Format JSON. The output is a 15-line document
with two-space indentation:
userandmetabecome readable top-level keys, androlesbecomes a clear two-item list. - Choose Convert JSON to YAML. The same data becomes an 11-line YAML
document — the shape Docker Compose and CI files use, with
user:,meta:, and list items indented consistently. - Choose Convert YAML to JSON. The result is byte-for-byte identical to the Step 1 output — the round trip loses nothing.
- Try a Base64 round trip. Encoding
hello worldgivesaGVsbG8gd29ybGQ=; decoding it returns the original text exactly.
Every step is deterministic: the same input always produces the same output, with no timestamps, randomness, or reordering — and a malformed payload fails with an explicit line and column instead of a generic message.
How it works
Each transform is a small, deterministic function:
- Format / minify JSON — the payload is parsed with a strict, position-aware JSON parser, then re-serialized with consistent indentation (or none). The parser reports the line and column of the first error instead of a generic message.
- JSON to YAML — parsed JSON is emitted as YAML with 2-space indentation. Repeated objects are expanded rather than turned into anchors, so output is stable and easy to diff.
- YAML to JSON — YAML is parsed locally and re-serialized as pretty-printed JSON, which is the safest format to paste back into configuration tools.
- Base64 — text is encoded as UTF-8 Base64, or decoded back. Decoding validates the alphabet and rejects input that is not valid UTF-8 text, with an explicit message (useful when the payload is actually binary data).
Identical input always produces identical output — there is no randomness, no timestamps, and no network in the pipeline.
Supported inputs and limits
- JSON: objects, arrays, strings, numbers, booleans, and null, including Unicode escapes.
- YAML: mappings, sequences, nested structures, and scalars (strings, numbers, booleans, null).
- Base64: standard alphabet with or without padding; whitespace is ignored.
- Size: bounded by this browser tab's memory. Very large payloads may be slow to re-serialize.
- Failure cases: malformed JSON and YAML produce explicit errors with position details; invalid Base64 characters and non-UTF-8 decoded bytes are rejected with clear messages.
This prototype intentionally does not validate JSON Schema, decode JWTs, or transform CSV. Those are candidates for future versions.
Frequently asked questions
Does my payload leave my computer?
No. The page is a static bundle of JavaScript; the transform functions run in your browser tab and the page contains no code that sends your input anywhere.
Why does YAML output sometimes quote my strings?
YAML quotes values when they would otherwise be misinterpreted (for example strings that look like numbers, booleans, or contain special characters). The quoting is deterministic and safe to paste back into YAML files.
Can I convert YAML with comments?
Comments are stripped, because JSON cannot represent them. Use the JSON-to-YAML direction if you want a YAML document that keeps structure intact.
Why does Base64 decoding reject my input?
Either the text contains characters outside the base64 alphabet, or the decoded bytes are not valid UTF-8. If you are decoding binary data, it cannot be shown as text — the error message tells you which case you hit.
Does formatting or converting change my data?
No. Formatting and minifying only re-serialize the parsed values with different whitespace, and a JSON → YAML → JSON round trip returns the identical document. The transforms are deterministic: the same input always produces the same output, with no timestamps, randomness, or reordering.
Why is there no JWT decoder or JSON Schema validator?
This prototype intentionally covers JSON formatting and validation, JSON ⇄ YAML conversion, and Base64. Decoding JWTs and validating against JSON Schema are on the roadmap but not implemented yet — the page will not pretend to do them.
Related tools
- Date Calculator — count days and business days between dates, or add and subtract days.
- RAG Cleaner — prepare messy text and data for LLM pipelines.
- Text Hygiene — inspect invisible characters in pasted text.
- Volumetric Weight Calculator — compute chargeable weight alongside the shipping data you format here.
- Document Hygiene — remove EXIF, GPS, and other metadata from photos and PDFs.
- Media Optimizer — resize and compress images in your browser.
- Time Coordinator — plan schedules across time zones with DST-aware local times.
- Subtitle Converter — convert SRT and VTT subtitle files locally.
- Passphrase Generator — create strong random passphrases locally from the EFF word list.
- Bingo Card Generator — make free printable bingo cards for 75-ball, 90-ball, or word games.
- CBM Calculator — estimate cubic meters (CBM) and container fit for sea-freight shipments.
- Color Contrast Checker — check the WCAG contrast ratio between two colors with AA/AAA verdicts.
- Freight Class Calculator — estimate the NMFC freight class from pallet dimensions and weight (standard LTL density scale, classes 50–500).
Part of Local Toolworks. Last reviewed: 2026-08-16. When to use · Worked example · Privacy & limitations · FAQ