URL Encode / Decode
Encode, decode, parse, and build URLs with query parameters — all in your browser.
About This Tool
The URL Encode / Decode tool helps developers work with
percent-encoded URLs. URL encoding (also called
percent-encoding) replaces unsafe characters with a
%HH escape sequence so they can be safely
transmitted in URLs, query strings, and form data. For binary
data in URLs, consider
Base64 encoding
with the URL-safe variant.
This tool offers four modes. Encode converts plain text into a URL-safe string. Decode reverses the process. Parse breaks a full URL into its components — protocol, host, port, path, query parameters, and fragment — so you can inspect each piece. Build lets you construct a URL from a base address and a list of key-value query parameters.
You can choose between component encoding (
encodeURIComponent) and
full URL encoding (encodeURI).
Component encoding is stricter and encodes characters like
/, ?, and &, making
it suitable for individual query-parameter values. Full URL
encoding leaves the URL structure intact and only encodes
characters that are never valid in a URI.
Everything runs client-side in your browser using the native
encodeURI, encodeURIComponent, and
URL APIs. No data is sent to any server, making it
safe for URLs that contain tokens, API keys, or other sensitive
parameters. To validate URL patterns programmatically, try the
Regex Tester
with a
URL matching pattern.
How to Use
- Choose a mode from the tabs: Encode, Decode, Parse, or Build.
- In Encode / Decode mode, paste your text and see the result instantly. Toggle Component to switch between
encodeURIComponentandencodeURI. - In Parse mode, paste a full URL to see its protocol, host, path, query parameters, and fragment.
- In Build mode, enter a base URL and add key-value pairs. The generated URL updates as you type.
- Click Copy or press Ctrl+Shift+C to copy the output.
About This Tool
FAQ
What's the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URI and leaves structural characters like /, ?, and # untouched. encodeURIComponent encodes everything except unreserved characters, making it suitable for individual query values or path segments.
Is my data safe?
Yes. All encoding and decoding happens in your browser using native JavaScript APIs. Nothing is sent to any server.
Why do I need to URL-encode text?
URLs can only contain a limited set of ASCII characters. Special characters (spaces, Unicode, &, =, etc.) must be percent-encoded to avoid breaking the URL structure or being misinterpreted by servers.
Can I parse URLs with fragments and ports?
Yes. The Parse mode uses the browser's built-in URL constructor and correctly handles ports, fragments (#), usernames, and all standard URL components.
How does the query string builder work?
Enter a base URL and add key-value pairs. The tool uses URLSearchParams to properly encode each parameter and appends them to the URL. The result updates in real-time as you type.
Related Tools
Base64 Encode/Decode
Encode and decode Base64 strings and files with drag-and-drop support.
String Escape/Unescape
Escape and unescape strings for JSON, JavaScript, HTML, URL, SQL, and CSV formats.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes for text and files.
Meta Tag Generator
Generate HTML meta tags, Open Graph, and Twitter Card tags with live SNS preview.
HTTP Method Reference
Interactive HTTP method reference with detailed specs for GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, and more.
AWS S3 URL Parser
Parse AWS S3 URLs into bucket, key, region, and URL style. Build S3 URLs from components. Supports virtual-hosted, path-style, s3://, and ARN formats.
Port Number Reference
Browse and search 100+ well-known, registered, and dynamic TCP/UDP port numbers with service names and protocol details.
URL Parser & Builder
Parse URLs into components or build URLs from parts. Extract protocol, hostname, port, path, query parameters, and hash fragment.
Data URL Generator
Generate data URIs from files or text, decode existing data URIs, and get CSS/HTML/Markdown snippets instantly.