Convert AsciiDoc to CSV

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

AsciiDoc vs CSV Format Comparison

Aspect AsciiDoc (Source Format) CSV (Target Format)
Format Overview
AsciiDoc
AsciiDoc Markup Language

Lightweight markup language created by Stuart Rackham in 2002 for technical documentation. Supports = headings, *bold*, _italic_, tables (|===), source code blocks (----), admonitions, cross-references, and include directives. Tables in AsciiDoc use pipe-delimited syntax with flexible column formatting.

Markup Language Technical Docs
CSV
Comma-Separated Values

Simple tabular data format where values are separated by commas and records by newlines. Defined in RFC 4180, CSV is universally supported by spreadsheet applications, databases, and data processing tools. It is the most common format for exchanging tabular data between systems.

Tabular Data Universal Format
Technical Specifications
Structure: Plain text with markup directives
Encoding: UTF-8
Format: Human-readable markup
Compression: None
Extensions: .adoc, .asciidoc, .asc
Structure: Rows of comma-delimited fields
Encoding: UTF-8 or ASCII
Format: Plain text tabular data
Standard: RFC 4180
Extensions: .csv
Syntax Examples

AsciiDoc table syntax:

|===
| Name | Role | Department
| Alice | Developer | Engineering
| Bob | Designer | Creative
| Carol | Manager | Operations
|===

CSV output:

Name,Role,Department
Alice,Developer,Engineering
Bob,Designer,Creative
Carol,Manager,Operations
Content Support
  • Rich text formatting and structure
  • Tables with headers, footers, spans
  • Source code blocks
  • Admonitions and callouts
  • Images, links, footnotes
  • Cross-references and includes
  • Document metadata and attributes
  • Rows and columns of data
  • Header row (first row convention)
  • Text and numeric values
  • Quoted fields for special characters
  • No formatting or styling
  • No nested structures
  • Simple flat data only
Advantages
  • Rich documentation features
  • Powerful table formatting
  • Multiple output formats
  • Version control friendly
  • Include and modular system
  • Professional publishing quality
  • Universal spreadsheet compatibility
  • Extremely simple format
  • Database import/export standard
  • Small file sizes
  • Easy to parse programmatically
  • Works with Excel, Google Sheets, etc.
Disadvantages
  • Tables require specific syntax
  • Not directly importable into spreadsheets
  • Requires processing for data extraction
  • Markup overhead for simple data
  • No formatting or styling
  • No hierarchical data support
  • Delimiter conflicts with data
  • No data type information
  • No metadata support
Common Uses
  • Technical documentation with tables
  • API reference tables
  • Configuration reference docs
  • Project status reports
  • Comparison matrices
  • Spreadsheet data exchange
  • Database import/export
  • Data analysis pipelines
  • Report generation
  • Bulk data operations
  • ETL processes
Best For
  • Documenting data in rich context
  • Tables with annotations
  • Formatted reports
  • Human-readable data documentation
  • Raw data exchange
  • Spreadsheet import
  • Database operations
  • Data processing automation
Version History
Introduced: 2002 (Stuart Rackham)
Modern Processor: Asciidoctor (2013)
Status: Active, widely adopted
Evolution: Asciidoctor 2.x (current)
Introduced: 1970s (early computing)
Standard: RFC 4180 (2005)
Status: Universal standard
Evolution: Stable, no major changes
Software Support
Asciidoctor: Full support (Ruby/JVM/JS)
GitHub: Native rendering
VS Code: AsciiDoc extension
Other: IntelliJ, Atom, Sublime Text
Excel: Full support (open/import)
Google Sheets: Full support
LibreOffice Calc: Full support
Other: Every database, Python, R, etc.

Why Convert AsciiDoc to CSV?

Converting AsciiDoc to CSV is valuable when you need to extract tabular data from your documentation for analysis, reporting, or import into spreadsheet applications and databases. AsciiDoc documents frequently contain data tables with configuration parameters, API endpoints, comparison matrices, or status reports that need to be processed in Excel, Google Sheets, or data analysis tools like Python pandas.

AsciiDoc tables use a pipe-delimited syntax (|===) that is excellent for documentation but not directly importable into data processing tools. The conversion extracts table content from AsciiDoc's markup format and transforms it into clean CSV with proper comma separation, quoted fields where necessary, and standard RFC 4180 formatting. This enables seamless data exchange between documentation systems and analytical tools.

This conversion is particularly useful in scenarios where documentation serves as the single source of truth for configuration data, feature comparison matrices, or API endpoint catalogs. Engineering teams often maintain tables in AsciiDoc that also need to be processed programmatically. Converting to CSV creates a machine-readable extract that can feed into automated testing, monitoring dashboards, or database seeding scripts.

When converting AsciiDoc to CSV, the process extracts tabular content while stripping markup formatting such as bold, italic, and links. Non-table content (paragraphs, headings, code blocks, admonitions) is either converted to a flat text representation or excluded depending on the conversion settings. For documents with multiple tables, each table can be extracted as a separate CSV section or file.

Key Benefits of Converting AsciiDoc to CSV:

  • Data Extraction: Pull structured data from documentation tables
  • Spreadsheet Import: Open AsciiDoc table data in Excel or Google Sheets
  • Database Loading: Import documentation data into SQL databases
  • Data Analysis: Process table data with pandas, R, or other tools
  • Automation: Feed documentation data into CI/CD pipelines
  • Reporting: Generate reports from documented data tables
  • Universal Format: CSV works with virtually every data tool

Practical Examples

Example 1: API Endpoint Documentation

Input AsciiDoc file (api-endpoints.adoc):

= API Endpoints

|===
| Endpoint | Method | Auth | Description
| /api/users | GET | Bearer | List all users
| /api/users/{id} | GET | Bearer | Get user details
| /api/users | POST | Bearer | Create new user
| /api/login | POST | None | Authenticate user
|===

Output CSV file (api-endpoints.csv):

Endpoint,Method,Auth,Description
/api/users,GET,Bearer,List all users
/api/users/{id},GET,Bearer,Get user details
/api/users,POST,Bearer,Create new user
/api/login,POST,None,Authenticate user

Example 2: Configuration Parameters

Input AsciiDoc file (config-reference.adoc):

== Configuration Parameters

|===
| Parameter | Default | Type | Description
| server.port | 8080 | Integer | HTTP listen port
| db.host | localhost | String | Database hostname
| db.pool.size | 10 | Integer | Connection pool size
| cache.ttl | 3600 | Integer | Cache TTL in seconds
|===

Output CSV file (config-reference.csv):

Parameter,Default,Type,Description
server.port,8080,Integer,HTTP listen port
db.host,localhost,String,Database hostname
db.pool.size,10,Integer,Connection pool size
cache.ttl,3600,Integer,Cache TTL in seconds

Example 3: Feature Comparison Matrix

Input AsciiDoc file (comparison.adoc):

== Feature Comparison

|===
| Feature | Free Plan | Pro Plan | Enterprise
| Users | 5 | 50 | Unlimited
| Storage | 1 GB | 100 GB | 1 TB
| Support | Email | Priority | Dedicated
| API Access | No | Yes | Yes
|===

Output CSV file (comparison.csv):

Feature,Free Plan,Pro Plan,Enterprise
Users,5,50,Unlimited
Storage,1 GB,100 GB,1 TB
Support,Email,Priority,Dedicated
API Access,No,Yes,Yes

Frequently Asked Questions (FAQ)

Q: What is CSV format?

A: CSV (Comma-Separated Values) is a plain text format for storing tabular data. Each line represents a row, and values within a row are separated by commas. Fields containing commas, newlines, or quotes are enclosed in double quotes. CSV is defined in RFC 4180 and is universally supported by spreadsheet applications and databases.

Q: Which parts of an AsciiDoc document are converted to CSV?

A: The conversion primarily extracts tabular data from AsciiDoc table blocks (|=== delimited sections). Non-table content such as headings, paragraphs, code blocks, and admonitions may be converted to a flat text representation or excluded. Tables are the primary source of structured data suitable for CSV format.

Q: How are AsciiDoc table headers handled?

A: AsciiDoc table headers (the first row after |===) are preserved as the first row of the CSV output. In AsciiDoc, header rows are typically styled differently, but in CSV they appear as a standard data row. Most spreadsheet applications will recognize the first row as headers when importing.

Q: What happens to formatting inside table cells?

A: Markup formatting within AsciiDoc table cells (such as *bold*, _italic_, links, and inline code) is stripped during CSV conversion, leaving only the plain text content. CSV is a data-only format that does not support text styling or formatting.

Q: Can I open the CSV output in Excel?

A: Yes! CSV files can be opened directly in Microsoft Excel, Google Sheets, LibreOffice Calc, Apple Numbers, and virtually any spreadsheet application. Simply double-click the .csv file or use the application's import function for more control over delimiters and encoding.

Q: How are commas in AsciiDoc cell data handled?

A: If an AsciiDoc table cell contains commas, the CSV output encloses that field in double quotes as per RFC 4180. This ensures the comma within the data is not confused with the field separator. For example, "New York, NY" would appear as a properly quoted CSV field.

Q: What about AsciiDoc documents with multiple tables?

A: Documents with multiple AsciiDoc tables can have each table extracted separately. The tables may be combined into a single CSV with section separators, or each table can be exported as an individual CSV file. This depends on the conversion settings chosen.

Q: Can I convert AsciiDoc CSV-format tables?

A: Yes. AsciiDoc supports a CSV table format using [%header,format=csv] followed by the |=== delimiter. These tables already contain comma-separated data and convert very naturally to CSV format, often requiring minimal transformation beyond removing the AsciiDoc table delimiters.