Javascript to Base64
Encode JavaScript source into Base64 for inline transport.
Enter or Upload
Input your text or upload a file
Choose Action
Encode, decode or view information
View Results
See output and extra details
Input (Binary)
101010 111100 110101 ...
Split into 6-bit
101010 111100 110101 ...
Convert to Index
42 60 53 ...
Base64 Characters
q 8 1 ...
100% Private & Secure
All processing happens in your browser. No data is sent to any server.
Working with source files? Pair this with CSS Beautifier or use HTML to Base64 for markup-specific payloads.
Encode JavaScript source into Base64 for embedding inside data URIs, JSON config blobs, or systems that mangle whitespace. The encoder leaves your code unchanged.
If you generate a data:text/javascript;base64,... URL from the result, the script will execute when loaded. Encode only code you trust to run in that context.
No — bytes go in unchanged. Run a minifier first if size matters.
Yes. Backticks, escapes, and newlines all survive Base64 encoding without alteration.
Only if you place it inside a context that evaluates it (such as a data:text/javascript;base64,... URL). Encoding alone does nothing.
No. Encoding is performed locally in your tab.