JSON to Query String Converter

This tool converts between a JSON object and a URL query string, the encoded key-value text that carries parameters in a web address. A query string is the part of a URL after the question mark, a series of key-value pairs joined by ampersands, such as the parameters that drive a search or filter a page. Web applications constantly need to move between this flat string form and the structured objects their code works with: building a query string from an object to make a request, or parsing one back into an object to read the parameters. Doing it by hand means fiddly percent-encoding and splitting, which is exactly where mistakes creep in. This converter handles both directions. You paste a JSON object and it builds the corresponding query string, properly URL-encoding each key and value so spaces and special characters are safe, or you paste a query string and it parses it back into a formatted JSON object. The result updates as you type and runs entirely in your browser. Use it to build request parameters, to read and debug a query string, to convert between the two forms, or for web development. When converting JSON to a query string, each property becomes a key-value pair, with values encoded so that spaces become percent-twenty and other special characters are escaped, keeping the URL valid. When converting back, the pairs are split, decoded and assembled into a JSON object. The tool works best with flat objects of simple values, which is what query strings naturally represent; deeply nested objects and arrays can be encoded in several competing conventions, so for those a dedicated library matching your framework is safer. For the common case of a flat set of parameters, this gives you a correct, ready-to-use result instantly in either direction.

-

Best for flat objects of simple values. Encodes/decodes each key and value. Nested objects and arrays have competing conventions; use a framework library for those. Runs in your browser.

How it works

To build a query string, each property of the JSON object becomes a key-value pair, with the key and value URL-encoded so spaces and special characters are safe, joined by ampersands. To parse a query string, it is split on ampersands and equals signs, each part is decoded, and the pairs are assembled into a JSON object.

Worked example

The JSON object with name Calculate, page 2 and q tax tools becomes the query string name=Calculate&page=2&q=tax%20tools, with the space in the search term encoded as percent-twenty. Switching to the other mode and pasting that query string back rebuilds the original JSON object.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

© 2019 to 2026 Calculate.co.nz. All rights reserved.