Guides
URL-encode characters for query strings without breaking the link

Broken links often hide in the query string. A search term with spaces, a file name with parentheses, or a filter value with & can cut the URL where the browser or server least expects it. Percent-encoding turns those characters into safe codes (%20 for a space, and so on) so the link stays one piece. Toolsy’s URL encoder runs encode and decode in your browser. Encode the query (or the path segment you mean to escape), not the whole https:// address. Pair encoding with a URL parser when you need to see each parameter on its own line. This guide covers when encoding is required, how to check the result, and how it differs from Base64.
Why query strings break without encoding
A URL has structure: scheme, host, path, query, hash. The query starts after ? and uses & to separate keys. If a value itself contains &, =, #, quotes, or spaces, parsers treat those characters as structure instead of data. You get truncated parameters, empty values, or a 404 that looks like a routing bug.
Spaces are the classic case. Some stacks turn a space into + in application/x-www-form-urlencoded bodies; in many pasted links you see %20. Both can be correct in context. Special Unicode characters, non-ASCII file names, and characters reserved by RFC 3986 also need encoding when they appear as data.
Marketing and analytics links are frequent victims. A UTM campaign name with spaces or a pipe character can ship from a spreadsheet into a CMS field without encoding. The click still “works” until a downstream system splits on the wrong character. Encode before you paste into docs, tickets, or email.
What you can fix yourself before opening a tool
Read the raw URL and mark the boundary after ?. Everything to the left of that mark (scheme, host, path) should stay human-readable unless a path segment literally contains reserved characters. Encode values, not key names you already control as ASCII.
If you built the link in code, check whether your HTTP client or framework already encodes. Double-encoding (%2520 when you wanted %20) is as common as forgetting to encode. Decode once and read the plain string when something looks wrong.
For a quick manual check, paste the full URL into a URL parser and inspect each query key. If a value spills into the next key, that value needed encoding. The wave 13 companion URL parser for UTM debugging walks the UTM-specific case.
Encode only the query (or the segment)
Do not run “encode” on https://example.com/search?q=hello world as one blob if the tool escapes :, /, and ?. You can end up with an unusable string. Copy just hello world (or the full q=hello world value side), encode, then reassemble. Product tip from the tool SEO copy: encode the query only; do not encode the domain.
Decode to verify the round trip
Switch the URL encoder to Decode and paste the percent-coded string. You should see the original spaces and punctuation. If decode fails or produces mojibake, you may have cut the string mid-sequence or mixed UTF-8 with a different encoding.
How to prepare the string you will encode
Strip surrounding quotes from spreadsheets. Watch invisible characters; they encode into odd sequences and confuse APIs. For CSV-related ghosts, see Invisible characters breaking your CSV.
Decide whether you are encoding a single parameter value or a whole query blob. For APIs under test, encode each value the same way the client library would. For human-pasted tracking links, encode campaign names and content labels that contain spaces.
Keep a plain-text note of the decoded form next to the encoded form in your ticket. Future you (or support) will thank you when a partner asks “what does this link mean?”
Walkthrough in the URL encoder
- Open URL encoder.
- Paste the plain text that belongs in the query (or the coded string if you are decoding).
- Choose Encode or Decode.
- Copy the result and paste it back into the full URL in the right place.
- Open the finished link in a private window or hit the API once to confirm parameters arrive intact.
Everything runs in the browser. The product FAQ states the text is not sent to a server. Still follow your team’s rules for pasting customer data into any web page; see Is it safe to upload documents online? for the broader habit.
Flags and formats you might see next to percent codes
Form bodies may use + for spaces. JSON APIs usually expect UTF-8 percent-encoding in the URL, not +. Path segments sometimes need encoding separately from the query. When social crawlers misread a share URL, check encoding before you blame Open Graph tags alone; Open Graph tags and social previews covers the metadata side.
API test URLs
Postman collections and curl examples rot when someone pastes an unencoded filter. Encode once, then store the encoded form in the collection, or store the plain form and document “encode before send.” Either habit beats silent breakage in CI.
How to check the result and fix errors
Compare parameter counts before and after. If you had three keys and the server sees two, look for an unencoded & inside a value. If a value shows %2520, you encoded twice; decode until readable, then encode once.
Click the link. Confirm the page or API response matches the intended filter. For UTM links, confirm utm_source, utm_medium, and utm_campaign in analytics debug views or in the parser output.
Mismatch between browser address bar display and the actual request is normal: browsers may show readable Unicode while still sending encoded bytes. Trust the network panel or server logs for the wire form.
Related jobs: parser, Base64, and publish checks
Use URL parser to split host, path, query, and hash after you encode. Use Base64 only when a system asks for Base64, not for ordinary link safety; URL encoding and Base64 solve different problems (the URL tool FAQ states they are not the same).
Before you ship a landing URL in a campaign, run your usual SEO checklist before you publish. Encoding will not fix a wrong canonical or a truncated title tag, but it will stop the click from dying in the query string.
Limits, privacy, and when not to use this
The Toolsy encoder is free, browser-side, and aimed at paste-sized strings. It is not a bulk redirect migrator and not a full URI normalizer library. It will not magically fix server-side routing bugs.
Do not treat percent-encoding as encryption or access control. Encoded tokens in a URL still appear in logs, Referer headers, and browser history. Prefer POST bodies or proper auth for secrets.
If policy forbids pasting production customer strings into any browser tool, use local encodeURIComponent in a REPL or your language’s standard library instead.
Frequently asked questions
What does URL encode mean for a query string?
URL encode (percent-encode) replaces reserved or unsafe characters with % plus hex codes so the query stays one valid string. Spaces often become %20. You encode data inside parameters so & and = keep their structural meaning.
When do I need a URL encoder online?
Use one when a pasted link fails because of spaces, quotes, or other signs in the query, or when you are building a test URL by hand. The URL encoder also decodes so you can read an existing coded string. Prefer local code when your pipeline already encodes correctly.
What does %20 mean in a URL?
%20 is the percent-encoded form of a space character (ASCII 0x20). Seeing it in a query usually means someone encoded a phrase correctly. If you expected a readable space in a doc, decode the string for humans and keep the encoded form for the live link.
Should I URL-encode the entire https URL?
Usually no. Encoding the scheme, host, and separators produces a string browsers cannot open as a normal link. Encode parameter values (and path segments that contain reserved characters), then keep https:// and the domain readable.
Is URL encode the same as Base64?
No. URL encoding is for safe characters in web links. Base64 packs arbitrary bytes into a different alphabet for configs, data URLs, and transports. The product FAQ on the encoder page draws the same line. See also Base64 encode for email HTML data URLs.
Does Toolsy’s URL encoder upload my text?
No. Encode and decode run in your browser per the tool FAQ. Your string stays on the device for that session. Clear the page on shared machines if the text is sensitive.
How do I URL-decode a string?
Paste the percent-coded text into the same URL encoder, switch to Decode, and copy the plain result. If parts stay coded, you may have only a fragment of the original string or a double-encoded value.
Why does my API still reject the encoded query?
The server may expect a different encoding style, a specific charset, or encoding at a different layer (path vs query vs JSON body). Compare a working request from your official client with your hand-built URL. Check for double-encoding and for unencoded characters you missed.
Can I use a URL parser with the encoder?
Yes. Parse first to see keys and values, encode the broken value, then reassemble. The URL parser lists query parameters on separate lines. The UTM-focused walkthrough is URL parser for UTM debugging.
Is a free URL encoder safe for tracking links?
For ordinary campaign names and filters, a browser-local encoder is a practical fix. Do not put passwords or session tokens in query strings at all. Follow your privacy rules for any customer-identifying values, even when the tool does not upload.
Encode the characters that break structure; leave the rest of the URL alone. For UTM and parameter debugging next, read URL parser for UTM debugging. For packing bytes into email HTML instead of links, see Base64 encode for email HTML data URLs.
Encode or decode a URL string
Paste text, encode or decode percent codes in your browser. Nothing is uploaded.


