Skip to main content
Free - No Sign-up Required

URL Encoder & Decoder

Encode and decode URLs online with support for encodeURIComponent and encodeURI. Perfect for query strings, API parameters, and URL paths.

Mode

Choose whether to encode or decode URLs

For query parameters and URL parts. Encodes all special characters including / ? # : @ & = + $ ,

Input

Enter the text or URL to encode

Output

Encoded URL

Quick Examples

Encoding query parameters:

Input: search?q=hello world&lang=en
Output: search?q=hello%20world&lang=en

Encoding special characters:

Input: name=John Doe&[email protected]
Output (Component): name%3DJohn%20Doe%26email%3Djohn%40example.com

Encoding full URL:

Input: https://example.com/path with spaces/file.html
Output (URI): https://example.com/path%20with%20spaces/file.html

Why Use Our URL Encoder?

Two Encoding Modes

Choose between encodeURIComponent for query parameters or encodeURI for full URLs.

100% Private

All processing happens in your browser. Your URLs are never sent to any server.

Real-time Conversion

See results instantly as you type. Automatic detection for decoding mode.

Common Use Cases

Query Parameters

Encode form data and search queries for URL parameters

name=John Doe → name%3DJohn%20Doe

URL Paths

Encode file names and folder paths with special characters

my file.pdf → my%20file.pdf

API Integration

Properly encode API request parameters and endpoints

filter=created>2024-01-01 → filter%3Dcreated%3E2024-01-01

Email Addresses

Encode email addresses in URLs

[email protected] → user%40example.com

Understanding URL Encoding

encodeURIComponent

Use this for encoding individual URL components like query parameters, form data, or any part of a URL that might contain special characters.

Encodes: / ? # : @ & = + $ ,
Best for: Query parameters
Example: Form input values

encodeURI

Use this for encoding complete URLs. It preserves URL structure characters but encodes spaces and other special characters.

Preserves: / ? # : @ & = + $ ,
Best for: Complete URLs
Example: Full web addresses

Pro Tip

When building URLs programmatically, use encodeURIComponent for individual parameter values, then concatenate them with & characters. Don't use encodeURI on the entire URL as it will preserve characters that might need encoding in specific contexts.

Your Privacy is Protected

This tool runs entirely in your browser using JavaScript's built-in encoding functions. Your URLs are never uploaded to our servers or any third-party service. All processing happens locally on your device.

Want more productivity tools?

Sign up for Txtpipe to access AI-powered task management, location-based reminders, and more.

No credit card required