Convert Textile to Base64

Drag and drop files here or click to select.
Max file size 100mb.
Uploading progress:

Textile vs Base64 Format Comparison

Aspect Textile (Source Format) Base64 (Target Format)
Format Overview
Textile
Textile Markup Language

Lightweight markup language created by Dean Allen in 2002. Used in Redmine, Textpattern CMS, and various web platforms for writing formatted content. Produces clean HTML from concise markup syntax for headings, formatting, lists, and tables.

Lightweight Markup Web Publishing
Base64
Base64 Encoding Scheme

Binary-to-text encoding scheme defined in RFC 4648 that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). Widely used for embedding data in JSON, XML, HTML data URIs, email attachments (MIME), and API payloads where binary data needs text-safe transport.

Data Encoding Text-Safe Transport
Technical Specifications
Structure: Plain text with inline markup
Encoding: UTF-8
Format: Human-readable text markup
Compression: None (plain text)
Extensions: .textile
Structure: Continuous ASCII string
Encoding: ASCII (64-character alphabet)
Format: RFC 4648 encoding
Overhead: ~33% size increase
Extensions: .b64, .base64, .txt
Syntax Examples

Textile markup syntax:

h1. Hello World

This is *bold* and _italic_.

* Item one
* Item two

Base64 encoded output:

aDEuIEhlbGxvIFdvcmxkCgpU
aGlzIGlzICpib2xkKiBhbmQg
X2l0YWxpY18uCgoqIEl0ZW0g
b25lCiogSXRlbSB0d28=
Content Support
  • Text formatting (bold, italic, underline)
  • Headings (h1-h6)
  • Ordered and unordered lists
  • Tables with headers
  • Hyperlinks and images
  • Block quotes
  • Code blocks
  • CSS attributes
  • Encodes any binary or text data
  • ASCII-safe representation
  • Preserves exact byte content
  • Embeddable in JSON strings
  • Data URI scheme support
  • MIME email compatibility
  • URL-safe variant available
  • Padding with = characters
Advantages
  • Human-readable content
  • Easy to write and edit
  • Meaningful document structure
  • Compact markup syntax
  • Good for web content
  • Version control friendly
  • Text-safe data transport
  • Embeddable in any text format
  • Universal decoding support
  • No special character issues
  • API and JSON compatible
  • Email attachment support
  • Data URI embedding
Disadvantages
  • Limited ecosystem support
  • Declining adoption
  • Not suitable for data transport
  • Special characters may cause issues
  • No standard encoding scheme
  • 33% size increase over original
  • Not human-readable
  • No formatting or structure
  • Must be decoded to be useful
  • Not suitable for large files
  • Processing overhead for encode/decode
Common Uses
  • Redmine wiki pages
  • Textpattern CMS content
  • Blog post authoring
  • Web content formatting
  • Project documentation
  • API request/response payloads
  • JSON and XML data embedding
  • Email attachments (MIME)
  • Data URIs in HTML/CSS
  • Database text field storage
  • Configuration file embedding
Best For
  • Writing formatted content
  • Redmine project management
  • CMS-based web publishing
  • Human-readable documents
  • Data transport in text protocols
  • Embedding content in APIs
  • Safe text encoding
  • Cross-system data exchange
Version History
Introduced: 2002 (Dean Allen)
Current Version: Textile 2
Status: Stable, limited development
Evolution: Minor updates only
Introduced: 1987 (Privacy Enhanced Mail)
Standard: RFC 4648 (2006)
Status: Universal standard
Evolution: URL-safe variant (Base64url)
Software Support
Redmine: Native support
Textpattern: Built-in
Pandoc: Read/write support
Other: Limited editor support
All Languages: Built-in encode/decode
Browsers: btoa()/atob() functions
CLI Tools: base64 command
Other: Universal support everywhere

Why Convert Textile to Base64?

Converting Textile files to Base64 encoding enables you to safely embed Textile content within text-based protocols and data formats. This is particularly useful when you need to include Textile markup in JSON API payloads, XML documents, database fields, or configuration files where special characters like asterisks, underscores, and pipe characters might cause parsing issues.

Base64 encoding transforms the Textile text into a safe ASCII string using only 64 characters (A-Z, a-z, 0-9, +, /), eliminating any risk of character escaping problems. The encoding preserves the exact byte content of the Textile file, including all markup characters, whitespace, and Unicode text, ensuring perfect reconstruction when decoded.

This conversion is commonly used in web applications that store or transmit Textile content through APIs, in automated systems that process Textile documents, and in scenarios where Textile files need to be embedded within other data structures. The Base64 representation can be included directly in JSON strings without escaping concerns.

While Base64 encoding increases the data size by approximately 33%, this trade-off is acceptable for the reliability and simplicity it provides in data transport scenarios. Every programming language and platform includes built-in Base64 encoding and decoding functions, making it universally supported.

Key Benefits of Converting Textile to Base64:

  • Safe Transport: No special character escaping issues in JSON, XML, or URLs
  • API Integration: Embed Textile content directly in API request/response bodies
  • Data Integrity: Exact byte-level preservation of Textile source
  • Universal Support: Decode with any programming language or tool
  • Database Storage: Store Textile content safely in text database fields
  • Data URIs: Embed encoded content in HTML data: attributes
  • Configuration: Include Textile templates in config files safely

Practical Examples

Example 1: API Payload Embedding

Input Textile file (content.textile):

h2. Release Notes

* Fixed *critical* bug in parser
* Added _new_ table support
* Improved performance by 30%

Output Base64 (content.base64):

aDIuIFJlbGVhc2UgTm90ZXMKCiogRml4ZWQgKmNyaXRpY2FsKiBi
dWcgaW4gcGFyc2VyCiogQWRkZWQgX25ld18gdGFibGUgc3VwcG9y
dAoqIEltcHJvdmVkIHBlcmZvcm1hbmNlIGJ5IDMwJQ==

Example 2: JSON Integration

Using Base64 in a JSON payload:

{
  "document": {
    "format": "textile",
    "content_base64": "aDEuIFByb2plY3QgUGxhbg...",
    "encoding": "base64"
  }
}

Decoding back to Textile:

# Python
import base64
textile_content = base64.b64decode(json_data["content_base64"])

# JavaScript
const textileContent = atob(jsonData.content_base64);

# Command line
echo "aDEuIFByb2plY3QgUGxhbg..." | base64 --decode

Example 3: Data URI Embedding

Input Textile file (template.textile):

h1. Welcome

p. Hello, *user*! This is your dashboard.

Embedded as Data URI:

data:text/plain;base64,aDEuIFdlbGNvbWUKCnAuIE
hlbGxvLCAqdXNlcio...

Use cases:
✓ Embed in HTML attributes
✓ Include in CSS content properties
✓ Pass through URL parameters
✓ Store in localStorage

Frequently Asked Questions (FAQ)

Q: What is Base64 encoding?

A: Base64 is a binary-to-text encoding scheme defined in RFC 4648 that represents data using 64 ASCII characters: uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), plus (+), and slash (/). It is used to safely transmit binary or text data through channels that only support ASCII text, with a 33% size overhead.

Q: Why would I encode Textile as Base64?

A: Textile markup contains characters like *, _, |, and # that may conflict with JSON, XML, or URL encoding. Base64 encoding eliminates these conflicts by converting the entire content to safe ASCII characters. This is essential for API payloads, database storage, configuration files, and any scenario where special characters cause parsing problems.

Q: How much larger is the Base64 output?

A: Base64 encoding increases the data size by approximately 33%. For example, a 3 KB Textile file becomes approximately 4 KB when Base64 encoded. This overhead is due to the encoding scheme representing every 3 bytes of input as 4 ASCII characters. For most text documents, this increase is negligible.

Q: Can I decode Base64 back to the original Textile?

A: Yes, Base64 encoding is fully reversible. Decoding produces the exact original Textile content byte-for-byte. Every programming language has built-in Base64 decode functions: Python (base64.b64decode), JavaScript (atob), Java (Base64.getDecoder), PHP (base64_decode), and command-line tools (base64 --decode).

Q: Is Base64 encoding the same as encryption?

A: No! Base64 is an encoding, not encryption. It provides no security whatsoever. Anyone can decode Base64 data back to its original form. If you need to protect sensitive Textile content, use proper encryption (AES, RSA) before or after Base64 encoding. Base64 is purely for data transport compatibility.

Q: What is the URL-safe Base64 variant?

A: Standard Base64 uses + and / characters that have special meaning in URLs. The URL-safe variant (Base64url, RFC 4648 Section 5) replaces + with - and / with _, making the output safe for use in URL parameters and file names without additional encoding. This is commonly used in JWT tokens and URL-embedded data.

Q: Can I use Base64-encoded Textile in HTML data attributes?

A: Yes, Base64-encoded Textile content can be safely stored in HTML data attributes (data-content="...") or used in data URIs (data:text/plain;base64,...). This is useful for JavaScript applications that need to embed Textile templates in the page and decode them on the client side.

Q: Are there size limits for Base64-encoded content?

A: Base64 itself has no size limit, but the systems consuming it may. JSON fields, URL parameters, database columns, and HTTP headers all have practical size limits. For very large Textile files, consider using file upload instead of Base64 embedding. Most APIs accept Base64 payloads up to several megabytes.