Loading…

How to use JSON to Query String

Paste a flat JSON object, and the tool converts it into a URL-encoded query string, repeating keys for array values.

Frequently asked questions

How are arrays handled?

An array value is expanded into repeated key=value pairs, for example {"t":["a","b"]} becomes t=a&t=b, which most servers parse back into a list.

Is everything URL-encoded?

Yes. Keys and values are passed through encodeURIComponent, so spaces, ampersands and other reserved characters are safely percent-encoded.

What about nested objects?

Nested object values are serialized to JSON and encoded as a single value. For best results provide a flat object of simple key-value pairs.

More Code Formatters

Line Counter
Count lines of code, blank lines, comment lines, and character statistics
Code Diff Viewer
Compare two code snippets and highlight differences with additions and deletions
Indentation Converter
Convert between tabs and spaces with customizable tab size for code formatting
Universal Code Beautifier
Generic code beautifier that works with any programming language syntax
CSV Column Aligner
Align CSV columns into an even monospace table so data is easy to read and scan
Env File Sorter
Sort .env files alphabetically by key, keep comments grouped and drop empty lines
Whitespace Normalizer
Normalize line endings to LF, strip trailing whitespace and collapse trailing blank lines
Blank Line Collapser
Collapse runs of consecutive blank lines into a single blank line for tidy documents
CSS Formatter
Beautify and format CSS code with proper indentation and structure for better readability
CSS Minifier
Minify CSS by removing whitespace, comments, and unnecessary characters to reduce file size
SQL Formatter
Format SQL queries with proper keywords capitalization, indentation, and line breaks
XML Formatter
Beautify XML with proper indentation and structure for better readability and debugging

← View all Code FormattersBrowse all 1,100+ tools →