×

注意!页面内容来自https://www.urlencoder.org/enc/slashes/,本站不储存任何内容,为了更好的阅读体验进行在线解析,若有广告出现,请及时反馈。若您觉得侵犯了您的利益,请通知我们进行删除,然后访问 原网页

Do you have to deal with URL-encoded format? Then this site is perfect for you! Use our super handy online tool to encode or decode your data.

Encode "slashes" to URL-encoded format

To encode binaries (like imagesdocumentsetc.) use the file upload form a little further down on this page.

Encode files to URL-encoded format

0 Click (or tap) here to select a file
The maximum file size is 100MB.
Working...
Please wait until the encoding process is complete.
Success!
{{ output }} to download the encoded file.
Please note that this file is removed from our system immediately after the first download attempt or 15 minutes of inactivity.
Error!
{{ error }}

Overview

Meet URL Decode and Encodea simple online tool that does exactly what it says: decodes from URL encoding as well as encodes into it quickly and easily. URL encode your data without hassles or decode it into a human-readable format.

URL encodingalso known as "percent-encoding"is a mechanism for encoding information in a Uniform Resource Identifier (URI). Although it is known as URL encoding it isin factused more generally within the main Uniform Resource Identifier (URI) setwhich includes both Uniform Resource Locator (URL) and Uniform Resource Name (URN). As such it is also used in the preparation of data of the "application/x-www-form-urlencoded" media typeas is often employed in the submission of HTML form data in HTTP requests.

Advanced options

  • Character set: Our website uses the UTF-8 character setso your input data is transmitted in that format. Change this option if you want to convert the data to another character set before encoding. Note that in case of text datathe encoding scheme does not contain the character setso you may have to specify the appropriate set during the decoding process. As for filesthe binary option is the defaultwhich will omit any conversion; this option is required for everything except plain text documents.
  • Newline separator: Unix and Windows systems use different line break charactersso prior to encoding either variant will be replaced within your data by the selected option. For the files sectionthis is partially irrelevant since files already contain the corresponding separatorsbut you can define which one to use for the "encode each line separately" and "split lines into chunks" functions.
  • Encode each line separately: Even newline characters are converted to their percent-encoded forms. Use this option if you want to encode multiple independent data entries separated with line breaks. (*)
  • Split lines into chunks: The encoded data will become a continuous text without any whitespacesso check this option if you want to break it up into multiple lines. The applied character limit is defined in the MIME (RFC 2045) specificationwhich states that the encoded lines must be no more than 76 characters long. (*)
  • Live mode: When you turn on this option the entered data is encoded immediately with your browser's built-in JavaScript functionswithout sending any information to our servers. Currently this mode supports only the UTF-8 character set.

(*) These options cannot be enabled simultaneously since the resulting output would not be valid for the majority of applications.

Safe and secure

All communications with our servers come through secure SSL encrypted connections (https). We delete uploaded files from our servers immediately after being processed and the resulting downloadable file is deleted right after the first download attempt or 15 minutes of inactivity (whichever is shorter). We do not keep or inspect the contents of the submitted data or uploaded files in any way. Read our privacy policy below for more details.

Completely free

Our tool is free to use. From now onyou don't need to download any software for such simple tasks.

Details of the URL encoding

Types of URI characters

The characters allowed in a URI are either reserved or unreserved (or a percent character as part of a percent-encoding). Reserved characters are characters that sometimes have special meaning. For exampleforward slash characters are used to separate different parts of a URL (or more generallya URI). Unreserved characters have no such special meanings. Using percent-encodingreserved characters are represented using special character sequences. The sets of reserved and unreserved characters and the circumstances under which certain reserved characters have special meaning have changed slightly with each new revision of specifications that govern URIs and URI schemes.

RFC 3986 section 2.2 Reserved Characters (January 2005)
! * ' ( ) ; : @ & = + $ , / ? # [ ]
RFC 3986 section 2.3 Unreserved Characters (January 2005)
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 - _ . ~

Other characters in a URI must be percent encoded.

Percent-encoding reserved characters

When a character from the reserved set (a "reserved character") has special meaning (a "reserved purpose") in a particular context and a URI scheme says that it is necessary to use that character for some other purposethen the character must be percent-encoded. Percent-encoding a reserved character means converting the character to its corresponding byte value in ASCII and then representing that value as a pair of hexadecimal digits. The digitspreceded by a percent sign ("%")are then used in the URI in place of the reserved character. (For a non-ASCII characterit is typically converted to its byte sequence in UTF-8and then each byte value is represented as above.)

The reserved character "/"for exampleif used in the "path" component of a URIhas the special meaning of being a delimiter between path segments. Ifaccording to a given URI scheme"/" needs to be in a path segmentthen the three characters "%2F" (or "%2f") must be used in the segment instead of a "/".

Reserved characters after percent-encoding
! # $ & ' ( ) * + , / : ; = ? @ [ ]
%21 %23 %24 %26 %27 %28 %29 %2A %2B %2C %2F %3A %3B %3D %3F %40 %5B %5D

Reserved characters that have no reserved purpose in a particular context may also be percent-encoded but are not semantically different from other characters.

In the "query" component of a URI (the part after a "?" character)for example"/" is still considered a reserved character but it normally has no reserved purpose (unless a particular URI scheme says otherwise). The character does not need to be percent-encoded when it has no reserved purpose.

URIs that differ only by whether a reserved character is percent-encoded or not are normally considered not equivalent (denoting the same resource) unless it is the case that the reserved characters in question have no reserved purpose. This determination is dependent upon the rules established for reserved characters by individual URI schemes.

Percent-encoding unreserved characters

Characters from the unreserved set never need to be percent-encoded.

URIs that differ only by whether an unreserved character is percent-encoded or not are equivalent by definitionbut URI processorsin practicemay not always treat them equivalently. For exampleURI consumers shouldn't treat "%41" differently from "A" ("%41" is the percent-encoding of "A") or "%7E" differently from "~"but some do. For maximum interoperabilityURI producers are therefore discouraged from percent-encoding unreserved characters.

Percent-encoding the percent character

Because the percent ("%") character serves as the indicator for percent-encoded octetsit must be percent-encoded as "%25" for that octet to be used as data within a URI.

Percent-encoding arbitrary data

Most URI schemes involve the representation of arbitrary datasuch as an IP address or file system pathas components of a URI. URI scheme specifications shouldbut often don'tprovide an explicit mapping between URI characters and all possible data values being represented by those characters.

Binary data

Since the publication of RFC 1738 in 1994it has been specified that schemes that provide for the representation of binary data in a URI must divide the data into 8-bit bytes and percent-encode each byte in the same manner as above. Byte value 0F (hexadecimal)for exampleshould be represented by "%0F"but byte value 41 (hexadecimal) can be represented by "A"or "%41". The use of unencoded characters for alphanumeric and other unreserved characters is typically preferred because it results in shorter URLs.

Character data

The procedure for percent-encoding binary data has often been extrapolatedsometimes inappropriately or without being fully specifiedto apply to character-based data. In the World Wide Web's formative yearswhen dealing with data characters in the ASCII repertoire and using their corresponding bytes in ASCII as the basis for determining percent-encoded sequencesthis practice was relatively harmless; many people assumed that characters and bytes mapped one-to-one and were interchangeable. Howeverthe need to represent characters outside the ASCII range grew quickly and URI schemes and protocols often failed to provide standard rules for preparing character data for inclusion in a URI. Web applications consequently began using different multi-bytestatefuland other non-ASCII-compatible encodings as the basis for percent-encodingleading to ambiguities as well as difficulty interpreting URIs reliably.

For examplemany URI schemes and protocols based on RFCs 1738 and 2396 presume that the data characters will be converted to bytes according to some unspecified character encoding before being represented in a URI by unreserved characters or percent-encoded bytes. If the scheme does not allow the URI to provide a hint as to what encoding was usedor if the encoding conflicts with the use of ASCII to percent-encode reserved and unreserved charactersthen the URI cannot be reliably interpreted. Some schemes fail to account for encoding at all and instead just suggest that data characters map directly to URI characterswhich leaves it up to individual users to decide whether and how to percent-encode data characters that are in neither the reserved nor unreserved sets.

Common characters after percent-encoding (ASCII or UTF-8 based)
newline space " % - . < > \ ^ _ ` { | } ~
%0A or %0D or %0D%0A %20 %22 %25 %2D %2E %3C %3E %5C %5E %5F %60 %7B %7C %7D %7E

Arbitrary character data is sometimes percent-encoded and used in non-URI situationssuch as for password obfuscation programsor other system-specific translation protocols.