Base64 Decoder

Oct 11, 2021

Base64 Decoder is used to decode base 64 encoded data back to its original non-encoded form. Our decode64 also supports decoding binary content. The following file types are supported - Images (PNG, GIF, JPEG), PDF, Zip. Send us a feedback if you want support for other file types.

Input: Paste base64 encoded text below

Settings

Encode text or files such as MP3 using Base64 encoding, all on the client-side.

View Tool

We use Base64 encoding to represent binary data in ASCII characters. It consists of 64 characters, including letters, numbers, and two symbols plus (+) and slash (/). Additionally, the equals sign (=) is the pad character at the end. The typical usage is to embed image data within scripts such as CSS. The cool thing about Base64 is that most programming languages support it natively using built-in APIs. You can decode and encode binary data without importing any external libraries.

In C#, the ToBase64String method of System.Convert class does this. This method takes a byte array as input and returns the result in ASCII string format. Typically, this is some binary data that we cannot transfer over the wire without corruption. However, you can also convert text into byte[] and then encode it using base64. One must question why this is needed because it is not the intended use of the Base-64 encoding scheme. In this form, you are just wasting bytes to represent your text data. Use Base64 strings if you want to perform binary to text encoding and transmit your data safely.

Check out the Programming Languages section below for a list of APIs for other languages. Read more at Wikipedia.

Settings Explained
  • 1. Source Encoding

    Specify the character set of the source data. applied after base64 decoding is complete. The default is UTF-8.

Example Substitutions
ValueChar
0A
1B
2C
3D
4E
5F
6G
7H
8I
9J
10K
11L
12M
13N
14O
15P
ValueChar
16Q
17R
18S
19T
20U
21V
22W
23X
24Y
25Z
26a
27b
28c
29d
30e
31f
ValueChar
32g
33h
34i
35j
36k
37l
38m
39n
40o
41p
42q
43r
44s
45t
46u
47v
ValueChar
48w
49x
50y
51z
520
531
542
553
564
575
586
597
608
619
62+
63/

How to do Base64 encoding and decoding in various programming languages

    • Language: C#
    • Encode: System.Convert.ToBase64String()
    • Decode: System.Convert.FromBase64String()
    • Example: Example
    • Documentation: Documentation
    • Language: VB .NET
    • Encode: System.Convert.ToBase64String()
    • Decode: System.Convert.FromBase64String()
    • Example: Example
    • Documentation: Documentation
    • Language: Java 8+
    • Encode: java.util.Base64.getEncoder().encode()
    • Decode: java.util.Base64.getDecoder().decode()
    • Example: Example
    • Documentation: Documentation
    • Language: Java 7 or less
    • Encode: org.apache.commons.codec.binary.Base64.encodeBase64()
    • Decode: org.apache.commons.codec.binary.Base64.decodeBase64()
    • Example: Example
    • Documentation: Documentation
    • Language: Python
    • Encode: base64.b64encode()
    • Decode: base64.b64decode()
    • Example: Example
    • Documentation: Documentation
    • Language: Ruby
    • Encode: Base64.encode64()
    • Decode: Base64.decode64()
    • Example: Example
    • Documentation: Documentation
Comments 0

History
Oct 11, 2021
Support for source character set
Oct 18, 2017
Support for binary data
Oct 1, 2017
Tool Launched