TOOLGRIDTOOLGRID
首页图片工具PDF 工具视频工具音频工具
More
开发工具Web 与 SEO分类文本工具计算器测试方法关于
Menu
首页图片工具PDF 工具视频工具音频工具开发工具Web 与 SEO分类文本工具计算器测试方法关于
109 个工具已上线
TOOLGRIDTOOLGRID

需要某项具体功能时,完整工具箱始终可用。

© 2026 TOOLGRID. All rights reserved.

Tools

图片工具PDF 工具视频工具音频工具转换工具开发工具Web 与 SEO文本工具计算器

Resources

分类测试方法隐私政策

Company

关于条款联系
Web 与 SEO
  1. 首页
  2. Web & SEO Tools
  3. Query String Builder
属于 Web & SEO Tools →

Query String Builder

Compose URL query strings from key-value rows — repeated keys for arrays, automatic percent-encoding, live preview.

开始使用这个工具
浏览器本地处理不向 TOOLGRID 上传输入复制前先检查
DEVELOPER 工作流Query String Builder 能力卡
输入
Pasted code or structured data
输出
Query String Builder result
运行引擎
Browser APIs
审核日期
2026-07-17
浏览器本地工作区在下方开始,使用浏览器本地处理。

工具代码会在浏览器中处理所选文件和输入内容,不会将其提交给 TOOLGRID 的处理接口。 TOOLGRID 只衡量工具使用情况,不记录你输入的内容。

  • 不上传工具输入至 TOOLGRID
  • 不登录
  • 复制前先检查

Loading tool…

浏览器内运行

这个工具能做什么

01

Free in-browser query string builder. Add key-value rows, get a fully percent-encoded query string back. Repeated keys produce array-style parameters (tag=a&tag=b). Use it to build API request URLs, deep links, campaign URLs, or any URL with parameters. Tool code does not submit entered values to a TOOLGRID processing endpoint.

02

Add one row per parameter. The tool concatenates them into a percent-encoded query string in the format ?key1=value1&key2=value2, updated live as you type. Copy the result and append it to any URL.

03

Repeated keys are supported natively — add the same key on multiple rows and you get array-style output (?tag=alpha&tag=beta&tag=gamma). This is the standard convention consumed by Express's qs parser, Rails strong parameters, Spring's @RequestParam List<>, and most modern frameworks. No special bracket syntax required.

04

Encoding uses the browser's built-in URLSearchParams, so values with spaces, ampersands, equals signs, emoji, or full Unicode are escaped correctly. You get the same percent-encoding the browser would produce when serializing a form — trustworthy without round-tripping through DevTools.

05

This tool composes, it does not parse. To break an existing URL apart into its query parameters, use our URL Parser. For campaign-specific UTM workflows, see the UTM Builder and Campaign URL Workspace. Tool code does not submit entered values to a TOOLGRID processing endpoint; no sign-up is required.

代表性任务

这个工具适合解决什么问题

Build campaign URLs with UTM parameters

Add rows for utm_source, utm_medium, utm_campaign, utm_content, and utm_term. The builder encodes spaces and special characters in campaign names automatically — no more broken Google Analytics attribution from malformed URLs.

Construct API request URLs for testing

When testing a REST or GraphQL endpoint in Postman, curl, or a browser, build the query string here first so every value is properly encoded. Especially useful when one of your filter values contains a comma, slash, or equals sign.

Generate array-style parameters for filters

Faceted search and tag filters typically use repeated-key parameters (?category=books&category=ebooks&category=audio). Add the same key on multiple rows and the builder outputs them in the format Express, Rails, and most backends expect by default.

使用边界

依赖结果前需要检查什么

  • Performance and maximum practical input size depend on browser memory, device speed, and the structure of the input.
  • Review the generated result before replacing or publishing an original file.
MDN Web APIs
继续当前流程下一步常用工具

如果还需要校验、转换或复用结果,可以继续打开相近的浏览器本地工具。

当前结果
产物检查结果动作检查结果
URL 解析器Web 与 SEO本地产物检查结果动作检查结果立即本地使用→URL 编码解码转换工具本地产物转换输出动作复制结果立即本地使用→UTM 链接生成器Web 与 SEO本地产物带追踪的 URL动作检查结果立即本地使用→

如何使用

01
01Edit the seeded rows or add new rows with the + button. Enter a key and value on each row.
02Watch the preview update live — the percent-encoded query string is shown as you type.
03Copy the generated string and append it to your base URL with a leading ? (or & if you're concatenating to an existing query).

使用场景

Build campaign URLs with UTM parameters

Add rows for utm_source, utm_medium, utm_campaign, utm_content, and utm_term. The builder encodes spaces and special characters in campaign names automatically — no more broken Google Analytics attribution from malformed URLs.

Construct API request URLs for testing

When testing a REST or GraphQL endpoint in Postman, curl, or a browser, build the query string here first so every value is properly encoded. Especially useful when one of your filter values contains a comma, slash, or equals sign.

Generate array-style parameters for filters

Faceted search and tag filters typically use repeated-key parameters (?category=books&category=ebooks&category=audio). Add the same key on multiple rows and the builder outputs them in the format Express, Rails, and most backends expect by default.

Compose mobile app deep links

Deep links of the form myapp://path?source=email&campaign=spring-sale need the same percent-encoding rules as web URLs. Build the query portion here, then append it to your custom scheme prefix.

Round-trip a query string with URL Parser

Build a query here, paste it into our URL Parser to verify Google sees what you intended, edit any rows that need adjustment, and copy the final version. The two tools are designed to be used together.

使用技巧

  1. 01
    Repeated keys produce array parameters

    Want ?tag=a&tag=b&tag=c? Just add three rows with key=tag and different values. This is the standard format consumed by most backend frameworks. No need for ?tag[]=a&tag[]=b unless your specific framework requires it (some older PHP setups do).

  2. 02
    Spaces become %20 — or + in form submissions

    URLSearchParams encodes spaces as %20 in URL query strings, which is correct for URLs. Some HTML form submissions encode spaces as +. Both decode back to a space; if your backend complains, normalize on one form before sending.

  3. 03
    Empty values produce key=, not just key

    A row with a key and an empty value outputs key= (key followed by equals followed by nothing). To omit the parameter entirely, delete the row instead of leaving the value blank. Some APIs treat key= as a falsy value, others as absent — be explicit about your intent.

  4. 04
    The hash fragment is not a query parameter

    Everything after # is the hash fragment, parsed separately by the browser and never sent to the server. Build your query string here, then append a hash manually if your single-page app needs one (e.g., #!/route/123).

常见问题

02
Are keys and values automatically URL-encoded?

Yes. Encoding uses the browser's built-in URLSearchParams API. Spaces become %20, ampersands become %26, equals signs become %3D, and full Unicode (including emoji) is escaped to its UTF-8 percent form. The output is safe to append to any URL without further escaping.

Does it handle repeated keys for array-style parameters?

Yes. Add the same key on multiple rows — the builder includes each row's value as a separate parameter in the output (e.g., tag=alpha&tag=beta). This matches what Express's qs parser, Rails strong parameters, and most modern backends consume by default.

Can I parse an existing query string back into rows?

Not in this tool — it's a builder, not a parser. To break a query string apart, use our URL Parser, which decomposes the full URL (protocol, host, path, query, hash) and lists every parameter with auto-labeled UTM and tracking tags. Build here, parse there.

What's the difference between this and the UTM Builder?

This tool is a generic any-parameter builder — keys and values are freeform. The UTM Builder is purpose-built for Google Analytics campaign URLs with named fields (Source, Medium, Campaign, Content, Term) and validation specific to UTM conventions. Use UTM Builder if you only need campaign URLs; use this when you need arbitrary query parameters for APIs, filters, or deep links.

Does the tool support empty values or empty keys?

Empty values output key= (a key followed by an equals sign and nothing). Empty keys are skipped — a row with no key contributes nothing to the output. To remove a parameter, delete the row instead of clearing one of its fields.

Is my data sent to a server?

The URLSearchParams API is built into every modern browser, and the tool runs in your browser. Tool code does not submit entered keys, values, or generated query strings to a TOOLGRID processing endpoint. Review browser extensions and device security before handling sensitive parameters.

Will the output work with my framework's query parser?

For repeated keys (arrays), yes — Express qs, Rails strong parameters, Spring @RequestParam List, ASP.NET model binding, and Go's url.Values all accept the standard ?key=a&key=b format. PHP defaults are an exception: you may need ?key[]=a&key[]=b — type the brackets explicitly in your key field if so.

相关工具

03
本地

URL 解析器→立即本地使用No TOOLGRID input upload

解析 URL 的协议、主机、路径、哈希和查询参数,并支持参数解码。

检查结果检查结果

本地

URL 编码解码→立即本地使用No TOOLGRID input upload

把文本转换为 URL percent encoding,或把编码内容还原为可读文本。

转换输出复制结果

本地

UTM 链接生成器→立即本地使用No TOOLGRID input upload

为广告、邮件、社媒和内容投放快速生成带 UTM 参数的 campaign URL。

带追踪的 URL检查结果