URL Encoder and Decoder
Encode text for a URL component, preserve the structure of a complete URL, or build and inspect query parameters. Everything runs locally in your browser.
Encode or decode URL data
No input is submitted to MiniUtils. Avoid putting passwords, tokens, or other secrets in any URL.
What URL encoding actually does
URLs use certain characters as structure. A colon separates a scheme, slashes help form a path, a question mark begins a query, an ampersand separates query pairs, an equals sign divides a parameter name from its value, and a hash begins a fragment. When text data contains a character that could be mistaken for structure, percent-encoding represents its UTF-8 bytes using a percent sign followed by two hexadecimal digits.
For example, a space in an individual component becomes %20, while the text tea & coffee becomes tea%20%26%20coffee. The ampersand is encoded because it belongs to the data. Leaving it unchanged inside a query value could make a server interpret the text after it as another parameter.
Encoded component: summer%20sale%20%26%20offers
Choose the correct context
URL component or parameter value
Use component mode for one dynamic value: a search phrase, filename, redirect target, tag, user-entered label, or parameter value. This mode uses the browser’s encodeURIComponent and decodeURIComponent behavior. It encodes structural characters such as question marks, ampersands, equals signs, slashes, and hashes because they are treated as data rather than URL syntax.
Complete URL
Use complete URL mode when the input already contains meaningful URL structure. It preserves separators such as :, /, ?, &, =, and # while encoding characters that do not belong unescaped. This mode uses encodeURI and decodeURI. It should not be used to insert an untrusted value into a query because reserved characters in that value may remain active.
Query parameters
Query mode uses URLSearchParams. For encoding, enter one name=value pair per line. Duplicate names are kept, making the mode useful for filters such as repeated category values. For decoding, paste a query beginning with an optional question mark. The output shows one decoded pair per line. Form-style query serialization commonly converts a space to +, which is different in appearance from component mode’s %20 but valid for this context.
Common mistakes and safer practices
- Encoding twice: encoding
%20again produces%2520because the percent sign itself becomes data. Decode only when you know the input is encoded. - Encoding an entire URL as one component: this also encodes its slashes and colon, so the result is no longer directly navigable. Select complete URL mode instead.
- Assuming decoding is sanitisation: decoded text can still contain HTML, script fragments, SQL syntax, or path separators. Validate and escape data for its destination.
- Putting secrets in URLs: even though this page processes locally, a URL used elsewhere can appear in history, server logs, screenshots, referrer information, analytics, or shared messages.
- Changing a signed URL: decoding and re-encoding may change character case, ordering, or space representation. Those changes can invalidate a signature even when the displayed data looks equivalent.
Methodology and limitations
Component and complete URL conversions call the browser’s native JavaScript encoding functions. Query conversion uses the native URLSearchParams interface. Unicode text is converted according to browser URL-processing rules. A malformed percent sequence, such as a percent sign without two hexadecimal digits, produces a readable error rather than a partial result.
This tool does not validate whether a hostname exists, whether a URL is safe to visit, or whether the receiving application interprets query data correctly. It does not perform Punycode inspection, canonicalisation, redirect checking, malware scanning, or server-side request testing. Always validate URLs separately when security or payment flows are involved.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves characters that form a complete URL. encodeURIComponent treats those separators as ordinary data and encodes more of them. A parameter value normally needs component encoding.
Why does a space become + in query mode?
URLSearchParams follows form-style query serialization, where a space is represented as a plus sign. A literal plus sign in data is percent-encoded so it is not confused with a space.
Can I decode several query parameters at once?
Yes. Select Query parameters and Decode, then paste everything after the question markāor include the question mark. Duplicate parameter names remain on separate lines.
Does decoding make an unknown URL safe?
No. Decoding improves readability but does not establish trust. Inspect the scheme, hostname, destination, and application-specific meaning before opening or sharing an unfamiliar URL.
Does MiniUtils store the input?
The conversion code runs locally and does not submit the editor contents. Standard analytics and advertising may operate on the page as described in the Privacy Policy, so confidential values should still be handled carefully.
Technical references
The WHATWG URL Standard defines browser URL parsing, percent-encoding sets, and URLSearchParams behavior. For protocol-oriented terminology, RFC 3986 describes URI syntax and percent-encoded octets. Receiving systems can apply additional rules, so test the exact API or application that will consume your result.