How to use JSON Formatter and Validator
- Paste your JSON.
- Choose indentation or minify.
- Copy the formatted result, or fix the error shown.
About this tool
The formatter parses your JSON with the browser's strict parser, so anything that works here will also work in JSON.parse. Invalid input shows the parser's message, which usually points at the position of the problem such as a trailing comma or single quotes.
Nothing is uploaded, so it is safe to use with API responses that contain private data.
Frequently Asked Questions
- Why is my JSON invalid?
- Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments, none of which are allowed in JSON.
- Does formatting change the data?
- No. Only whitespace changes. Key order is preserved.
Related tools
- Base64 Encoder and DecoderConvert text to Base64 and back without breaking non-English characters.
- FAQ Schema GeneratorPaste your questions and answers and get FAQPage markup.
- Text Diff CheckerPaste an original and a changed version to see exactly what differs.
- Word CounterPaste or type your text to count words, characters, sentences and paragraphs, with reading time.
- Character CounterCount characters and check your text against common platform and SEO limits.
- Case ConverterChange the capitalisation of any text, or convert it to a programming naming style.