JSON formatter and validator, Base64 and URL encode/decode
Format, minify and validate JSON with the exact line and column of any error, and encode or decode Base64 and URLs. Runs in your browser: your data is never uploaded.
100 % in your browser: your files and text never leave your device and nothing is uploaded.
How it works
Paste JSON and press Format to indent it (2 spaces, 4 spaces or tabs), Minify to remove all spaces, or Validate to check it; errors show the line and column where the problem is, for example a trailing comma or single quotes. You can sort the keys alphabetically. Very large integers (above 9,007,199,254,740,991) lose precision, because JSON is processed as JavaScript numbers. The Base64 tab converts text to and from Base64 using UTF-8, with an optional URL-safe variant. The URL tab encodes a single value (encodeURIComponent, escapes everything including / ? & =) or a whole address (encodeURI, keeps its structure), and decodes percent sequences back to text.
How to use it
- Open the JSON tab and paste your text into Input.
- Choose the Indent (2, 4 or Tab) and, if you wish, tick Sort keys to put the keys in alphabetical order.
- Press Format to indent it, Minify to remove all spaces, or Validate to check it without changing it.
- Read the Output and press Copy. If the JSON is wrong, a message gives the line and column of the problem.
Worked example
Paste the text {'a':1} and press Validate. The tool reports Line 1, column 2, unexpected character ' because JSON requires double quotes. Now paste {"name":"Ana","tags":["a","b"],"n":1,} and the message points to Line 1, column 38, the closing brace that follows the trailing comma. After removing the comma, Format with indent 2 puts every key on its own line, and with Sort keys the object {"b":2,"a":1} comes out with a first and b second. The Base64 and URL tabs encode and decode text with the same rules.
Frequently asked questions
Is my JSON uploaded?
No. It is parsed in your browser, so API responses and configuration files with private data stay on your device.
Why does it reject trailing commas, comments or single quotes?
The checker follows strict JSON (RFC 8259), which allows none of them. Many tools accept them, but real parsers often fail, which is why the line and column help you fix them.
Why did a very large number change?
JSON is processed as JavaScript numbers, so whole numbers above 9,007,199,254,740,991 lose precision. If you need such IDs intact, store them as strings.
What is the difference between the two URL modes?
Single value uses encodeURIComponent and escapes everything including / ? & =, which is right for a parameter. Whole address uses encodeURI and keeps the structure of the link.
Does the Base64 tab handle accents and emoji?
Yes. The text is converted to UTF-8 bytes first. URL-safe Base64 uses - and _ and no = padding.