Convert Query String to JavaScript

Use this Query String to JavaScript Object converter tool by pasting or uploading Query String in the left box below. Results will appear in the box on the right. Use an HTTP Query String and it will be converted to a JavaScript Object. Example: a=value&b=value2 will be converted to {a:'value', b:'value2'}

Input (Query String) - Paste your Query String here

Output (JavaScript Object) - The converted JavaScript Object

Converter Options
JS indent spacing
Number of spaces to use for indenting the JS output
Tab indent
Use tabs instead of spaces to indent JS

Want to convert JavaScript Object to Query String instead? Use the JavaScript Object to Query String Converter Tool.

How to use Query String to JavaScript Object Conversion Tool

  1. Paste your Query String input into the left input box and it will automatically convert it into JavaScript Object.
  2. The JavaScript Object output is the box to the right.
  3. If there are any errors in the Query String and the converter isn't able to do the conversion, the error message will appear in the output box letting you know where the error was found in the Query String.
  4. Use the control box to select options that will affect the conversion.
  5. Your Query String data is secure. ConvertSimple's converter does not send your Query String data to our servers for conversion, the process is done completely in your web browser. That's what makes ConvertSimple's converter the safest and fastest converter out there.

Query String Format

Name Query String
Full form name HTTP Query String
File extension .txt
Type of format Part of a URL
MIME type text/plain

JavaScript Format

Name JavaScript
Full form name JavaScript
File extension .js
Type of format Programming Language
MIME type text/javascript, application/javascript

Related Tools