Skip to main content

Text Tools

URL Encoder & Decoder – Encode and Decode URLs Online

Encode and decode URLs online for free with OneFileKit's URL encoder. Convert spaces, special characters, Unicode text and query parameters into percent-encoded format, or decode encoded strings back into readable text. Choose your encoding options, preserve URL structure when needed, and copy or download the result instantly. All normal conversion runs directly in your browser.

Up to 500000 characters · Runs in your browser

Your data stays in your browser.

1. Select Operation

2. Enter Text or URL

Characters: 0 | Lines: 0

3. Options

Quick Examples

  • Encode & Decode

    URL, text and parameters

  • Fast & Accurate

    Instant conversion

  • Special Characters

    Spaces, symbols, Unicode, and more

  • Copy & Download

    One-click actions

Encode and decode URLs without leaving your browser

Percent-encoding, Unicode, query parameters, and structure-preserving options — all client-side.

  • Standards-based encoding

    Uses encodeURIComponent / decodeURIComponent semantics with clear options for spaces and hex case.

  • Preserve URL structure

    Optionally keep scheme and host intact while encoding path, query, and fragment parts.

  • Unicode and special chars

    Spaces, symbols, and international text convert to safe percent-encoded sequences.

  • Copy or download

    Copy the result instantly or download a local text file — nothing is uploaded.

How to encode or decode a URL

Choose encode or decode, enter text or a URL, tune options, then copy or download.

  1. 1

    Choose Encode or Decode

    Select whether to convert text into URL-safe form or back.

  2. 2

    Enter text or a URL

    Paste a full URL, query value, path, or plain text — including Unicode.

  3. 3

    Tune options

    Control %20 spaces, special-character encoding, uppercase hex, and URL-structure preservation.

  4. 4

    Copy or download

    Use the result instantly, or download it as a text file.

Real URL encoding — standards-based and client-side

Free URL Encoder and Decoder Online

OneFileKit's free URL Encoder & Decoder converts text, special characters and URL components into percent-encoded format and decodes encoded values back into readable text.

URL encoding is commonly used in web development, API requests, query strings, application routing and data exchange.

The tool supports spaces, special characters, Unicode text and an optional mode that preserves the structure of complete URLs.

Why Use OneFileKit URL Encoder?

  • Encode and decode: Convert text to percent-encoded form or reverse the process.

  • Unicode support: Work with international characters.

  • Custom encoding options: Control spaces, special characters and hexadecimal letter case.

  • Preserve URL structure: Keep the scheme and host intact when using the supported mode.

  • Large input support: Process up to 500,000 characters.

  • Instant preview: Use the real-time preview option.

  • Copy and download: Save your conversion results.

  • Browser-based processing: Normal conversions run locally in your browser.

How to URL Encode Online

  1. Open the OneFileKit URL Encoder.

  2. Select URL Encode.

  3. Paste your URL, query value or text.

  4. Choose your preferred encoding options.

  5. Enable Preserve URL Structure when appropriate.

  6. Review the encoded result.

  7. Copy or download the output.

For example, hello world becomes hello%20world. The space is replaced with %20.

How to URL Decode Online

URL decoding reverses percent encoding. Use this free url decoder online in a few steps:

  1. Select URL Decode.

  2. Paste the encoded string.

  3. Run the conversion.

  4. Review the decoded result.

  5. Copy or download the text.

For example, hello%20world decodes to hello world. If the input contains malformed percent-encoded sequences, the tool shows a validation error.

What Is URL Encoding?

URL encoding, also called percent encoding, represents certain characters using a percent sign followed by hexadecimal digits. A space becomes %20, an ampersand becomes %26, a hash becomes %23 and a plus sign becomes %2B.

URLs have structural characters with special meanings. For example, ? introduces a query string, while & separates query parameters. Encoding these characters when they belong to a parameter value prevents them from being interpreted as URL delimiters.

URL Encoding Special Characters

To url encode special characters, use component-style encoding. The following table shows common results with JavaScript's encodeURIComponent() semantics.

Character

Encoded form

Space

%20

&

%26

=

%3D

?

%3F

#

%23

/

%2F

+

%2B

%

%25

@

%40

:

%3A

The precise result depends on the selected encoding mode. For example, encodeURIComponent() leaves some characters such as ! and ' unescaped by default, while the "Encode all special characters" option encodes them.

Percent Encoding Explained

Percent encoding represents a byte using % followed by two hexadecimal digits. For example, %20 represents the byte value 0x20, which is a space in ASCII and UTF-8.

Unicode characters are first represented as UTF-8 bytes, which are then percent-encoded. For example, Hello 世界 becomes Hello%20%E4%B8%96%E7%95%8C.

Percent encoding is a representation method, not encryption. Anyone can decode the encoded values.

URL Encoder vs URL Decoder

Feature

URL Encoder

URL Decoder

Input

Original text

Percent-encoded text

Output

Encoded string

Decoded text

Main operation

Percent encoding

Percent decoding

Typical use

Preparing URL components

Reading encoded values

Encryption

No

No

Use an encoder when preparing values for URLs, and a decoder when reading existing percent-encoded content. This is why an encode decode url tool needs both modes.

encodeURI vs encodeURIComponent

encodeURI() encodes a full URI while leaving structural delimiters unchanged. For example, encodeURI("https://example.com/search?q=hello world") returns https://example.com/search?q=hello%20world.

encodeURIComponent() encodes individual URI components, such as query parameter values. For example, encodeURIComponent("hello world & more") returns hello%20world%20%26%20more.

Use encodeURIComponent() for individual parameter values. For complete URLs, use URL-aware APIs rather than encoding the entire string as one component. See the MDN encodeURIComponent() reference.

How to URL Encode in JavaScript

const value = "red shoes & bags";
const encoded = encodeURIComponent(value);
console.log(encoded);
// red%20shoes%20%26%20bags

console.log(decodeURIComponent(encoded));
// red shoes & bags

const url = new URL("https://example.com/search");
url.searchParams.set("q", "red shoes & bags");
console.log(url.toString());
// https://example.com/search?q=red+shoes+%26+bags

URLSearchParams uses form-style query serialization, where spaces are represented by +. This differs from the %20 output of encodeURIComponent().

How to URL Encode in Python

from urllib.parse import quote, unquote, urlencode

print(quote("hello world & more", safe=""))
# hello%20world%20%26%20more

print(unquote("hello%20world%20%26%20more"))
# hello world & more

print(urlencode({"q": "red shoes", "sort": "price low"}))
# q=red+shoes&sort=price+low

Python's urlencode() uses form-style encoding by default.

URL Encoding Examples

Original text

Percent-encoded output

hello world

hello%20world

red & blue

red%20%26%20blue

name=value

name%3Dvalue

hello+world

hello%2Bworld

a/b

a%2Fb

100%

100%25

Hello 世界

Hello%20%E4%B8%96%E7%95%8C

These examples use component-style encoding with encodeURIComponent() semantics.

Common URL Encoding Errors

  1. Double encoding: encoding an already encoded string turns %20 into %2520. Encode values once, at the right stage.

  2. Incorrect space encoding: some systems use %20, while form-style query encoding uses +. Choose the format the destination expects.

  3. Encoding the entire URL: encoding a full URL as one component encodes structural delimiters. Use Preserve URL Structure to keep the scheme and host intact.

  4. Invalid percent sequences: input such as %ZZ is not valid percent encoding. Correct it before decoding.

  5. Unicode errors: invalid UTF-8 sequences cause decoding failures. Check the original encoding.

  6. Incorrect query parameter handling: manually joining query values introduces errors. Prefer URLSearchParams in JavaScript or urlencode() in Python.

Security and Privacy

URL encoding does not provide confidentiality or guarantee that a URL is safe to visit.

Normal encoding and decoding happen locally in your browser, without uploading input values. Analytics record only aggregate tool events, never the URL or text contents.

Avoid putting private tokens, credentials or confidential information in URLs, and always validate untrusted URLs before using them in redirects, network requests or application logic.

Frequently asked questions

A URL encoder converts certain characters into percent-encoded representations suitable for URL components, such as a space into %20.

Paste your text into the OneFileKit URL Encoder, select URL Encode, choose your options and copy or download the result.

Select URL Decode, paste the encoded text and review the decoded result. You can copy it or download it as a text file.

No. Encoding and decoding run locally in your browser, so your data stays on your device.

It keeps the scheme and host intact (for example https://example.com) and encodes the path, query and fragment separately. When it is off, the whole input is treated as a single component with encodeURIComponent semantics.

Percent encoding (RFC 3986) represents spaces as %20, which the "Encode spaces as %20" option follows. Form-style query encoding uses +, which the tool uses when that option is off.

encodeURI preserves URI delimiters such as / ? and &, while encodeURIComponent encodes them so they can be used safely inside an individual component like a query value.

Use component-style percent encoding, such as encodeURIComponent(), for individual parameter values. Turn on "Encode all special characters" to also encode characters like ! and '.

Decode validates sequences like %ZZ before converting and shows a clear error, with a character position when possible. Malformed input is not silently altered.

Yes. You can convert up to 500,000 characters at a time.

No. Analytics only record aggregate tool events such as view, start, complete and download. Your input and output are never sent.

No. URL encoding is a representation method, and anyone can decode it, so don't use it to protect sensitive data.

Security & Privacy

URL encoding is designed to stay on your device with clear validation and no content logging.

  • Browser-Based Processing

    Encode and decode run in your browser. There is no URL-conversion API that receives your text for normal use.

  • Data Privacy

    Analytics only record aggregate tool events (view, start, complete, download). Your URLs and text are never sent.

  • No Server Storage

    Converted data is not saved to databases, Redis, CMS fields, or server logs.

  • Safe URL Handling

    Inputs are treated as text — the tool does not fetch remote URLs or follow links while encoding or decoding.

  • Input Validation

    Decode validates percent-encoded sequences before conversion. Size limits are enforced in application code, not editable CMS fields.

  • Secure Copy & Downloads

    Copy and download create local results in your browser. Nothing is published as a public share link.

Encode or decode another URL

Paste another string or query value — conversion still runs entirely in your browser.

Open URL Encoder