Text
URL Encoder
Percent-encode text safely for use in URLs and query strings.
Press ⌘ Enter to run
21 words · 3 lines
How this tool handles files
- Processing
- In your browser, on-device
- Storage
- Nothing stored
- Output
- A file you download
- Your responsibility
- Review before official use
- Runs in your browser. Your file is processed on your own device and, on this site, is not uploaded to our servers.
- Nothing is stored. Your file and its output are gone the moment you close or reload the page.
- Review sensitive files (bank, ID, medical) and check the output before sharing it.
Every tool on FormatOS runs in your browser. Read our Privacy Policy and File Handling Policy.
Common uses
- Build safe query strings
- Encode form field values
Limitations
- Encodes every reserved character
Where percent-encoding actually earns its keep
This tool takes any text you type or paste and percent-encodes it so it survives being placed inside a URL. Spaces become %20, an ampersand becomes %26, a question mark becomes %3F, and accented or non-Latin characters are turned into their UTF-8 byte sequences. The practical point is to make a fragment of text safe to drop into a link without it breaking the URL's structure or being misread by a server.
The clearest fit is web and development work: assembling query-string values by hand, encoding a search term or a redirect target before pasting it into a parameter, preparing UTM tags, or sanity-checking a value your own code is producing. It is also handy when sharing links that contain spaces or punctuation, and for students or admin staff who need to paste a readable string into a tracking link or API console without guessing how special characters should look.
It is genuinely useful any time the text you want to carry in a URL contains characters a browser or server might treat as syntax rather than data. If your text is plain letters and digits, encoding it changes nothing, and that is the expected, correct outcome.
How encoding happens in your browser
The flow is direct: type or paste your text into the input box, and the encoded result appears in the output box as you go. There is no upload step and no convert button to wait on. When you are happy with the result, use Copy to put it on your clipboard or Download to save it as a plain .txt file named for this tool. Everything runs locally in the page, so nothing is sent to a server and nothing persists after you close the tab.
Under the hood it applies the standard component-encoding rule used for individual URL pieces. That means it deliberately escapes the reserved characters that separate a URL's parts, including & = ? / : # and the space. This is exactly what you want for a single value, such as one query parameter, where those characters must not be interpreted as delimiters.
What it does not do is treat your input as a whole, already-structured URL. It will not selectively preserve the scheme, host, or the separators between parameters, and it offers no toggle to switch between full-URL and component modes. There is no batch mode, no decoding here (a separate URL Decoder handles the reverse), and no validation that your text was a meaningful URL to begin with.
Pitfalls that come from encoding the wrong scope
The most common mistake is pasting an entire URL and expecting a still-usable link. Because every reserved character is escaped, https://example.com/?q=a becomes a string where the slashes, colon, and equals sign are all percent-encoded, which is not a clickable address. Encode only the individual value you intend to place inside a URL, not the surrounding structure.
A subtler trap is double-encoding. If your text already contains percent-encoded sequences, running it through again turns each % into %25, so %20 becomes %2520. Encode raw, human-readable text once and only once, and avoid re-encoding output that another tool or your code has already escaped. Likewise, a plus sign is encoded as %2B here rather than left as +; some legacy form handlers treat + as a space, so confirm which convention your target expects.
Edge cases worth noting: this follows component rules, so the characters - _ . ! ~ * ' ( ) are intentionally left unescaped, which is standards-correct but occasionally surprises people who expected everything non-alphanumeric to change. Non-Latin text and emoji expand into several percent-escaped bytes each, which is normal UTF-8 behaviour, not corruption.
Checking the result before you rely on it
Before using the output, read it back against your intent. Confirm you encoded just the value and not the link skeleton, that spaces show as %20, and that you do not see %25 where you expected a single % (a sign of accidental double-encoding). Paste the value into its real position in the URL and verify the surrounding separators are still literal characters, then open or run the assembled link to see that it resolves to what you meant.
A quick round-trip is the most reliable test: run the encoded string through the URL Decoder and check it returns your original text exactly, including any spaces, punctuation, and accents. If the decoded version differs, the input scope or encoding step needs revisiting before the link goes anywhere.
For anything official or financial, such as payment callbacks, signed parameters, or links in formal communications, treat this as a helper and verify manually. Test the final URL in the exact system that will consume it, and confirm with that platform's own documentation how it expects + , reserved characters, and Unicode to be encoded, since requirements vary between services.
Frequently asked questions
It percent-encodes characters that aren't safe in a URL component — including spaces, &, =, ?, /, and #, plus non-ASCII characters — so the text fits safely inside a query string or path segment.
No. Unreserved characters such as letters, digits, and - _ . ! ~ * ' ( ) are left as-is, matching standard component encoding. It's meant for a single value, not a whole URL.
When building query strings or embedding a value (like a search term or another URL) inside a URL, so reserved characters don't break the link.
No. Encoding runs entirely in your browser.
Related text tools
Tool last reviewed: June 30, 2026 · Report a problem