Format, validate and encode JSON in the browser
Paste a payload and get it pretty-printed or minified in one click. When it does not parse, you get the line, the column and a plain-English explanation instead of a bare "Unexpected token". The same page encodes and decodes URLs, Base64 and HTML entities.
JSON formatter
Errors are reported by line and column
Minified output keeps key order and drops every optional space; pretty output uses the indent you choose. Neither mode changes values — if you need to sort keys, that is a separate transformation and this tool deliberately does not do it silently.
URL, Base64 and HTML encoding
UTF-8 safe, reversible, not encryption
Base64 conversion goes through UTF-8, so Chinese, Japanese, emoji and accented characters survive the round trip. The classic browser shortcut (btoa() on the raw string) throws on anything outside Latin-1, which is the bug this tool avoids. Encoding is not secrecy: anyone holding the output can reverse it in a second.
The six JSON errors you will actually hit
| What you wrote | What JSON allows | What the parser says |
|---|---|---|
{'key': 1} | {"key": 1} | Expected property name in double quotes |
{"a": 1,} | {"a": 1} | Unexpected token } |
{"a": 1} // note | no comments at all | Unexpected token / |
{"a": undefined} | {"a": null} | Unexpected token u |
{"a": 01} | {"a": 1} | Unexpected number |
{"a": "line one
line two"} | {"a": "line one\nline two"} | Bad control character in string |
Each of these is covered with the exact fix in the JSON syntax checklist. For the encoding side, URL encoding and Base64 explained covers why a space becomes %20 in one context and + in another.