Markdown To Protocol Buffers

Login

Email
Password

Don't have an account yet?

Go to Sign up

Input Data
Sample {{ showCoderInput ? 'Choose File' : 'Enter Data' }}

                                
Valid Data Invalid Data — Cannot parse as table
Online Table Editor
Row Col Row Col
Transpose Clear Delete Empty Deduplicate
ABC abc Abc
Replace
First Row as Header
{{ displayRows.length }} rows x {{ displayHeaders.length }} columns{{ firstRowAsHeader ? ' (1 header)' : '' }} {{ selectedRows.length > 0 ? selectedRows.length + ' selected' : '' }}
Output Data ({{ jsonFormatDisplayName }})
{{ copied ? 'Copied!' : 'Copy to Clipboard' }} Download File
Properties
Convert Markdown Table to Protocol Buffers online — paste, edit, and download.

Syntax:
Package Name:
Message Name:
Field Type Detection:
Indent Size:
Convert Restart
Insert Row Below
Insert Row Above
Insert Column Right
Insert Column Left
Delete Row {{ contextMenu.row + 1 }}
Delete Column {{ contextMenu.col + 1 }}
Clear Cell
Clear Row
Case sensitive Use regex Cancel Replace All

What Is the Markdown To Protocol Buffers Converter?

The Markdown To Protocol Buffers Converter on A.Tools transforms Markdown pipe-delimited tables into .proto definitions — valid Protocol Buffers schema code you can use in gRPC services, data serialization pipelines, and cross-language API contracts. All processing runs in your browser. No data leaves your device.

API schemas and data models are often sketched as Markdown tables in design documents, wikis, and RFCs. Protocol Buffers requires a formal .proto file with message definitions, typed fields, and field numbers. This tool bridges that gap.

How to Convert Markdown Tables to Protobuf Definitions?

Step 1: Provide Your Markdown Data

Click Enter Data to paste a Markdown table into the input area, or click Choose File to drag and drop a .md file. Press Sample to load example data.

Step 2: Edit in the Online Table Editor

Once parsed, an interactive spreadsheet appears. Use the toolbar to:

  • Add or delete rows and columns

  • Transpose the table (swap rows and columns)

  • Remove duplicate rows

  • Delete empty rows and columns

  • Change text case (UPPERCASE, lowercase, Capitalize)

  • Find and replace values — supports case-sensitive search and regex

  • Toggle First Row as Header to define field names

Right-click any cell for context-menu operations.

Step 3: Configure Protobuf Settings

In the Properties panel:

SettingDefaultDescription
Syntaxproto3Protocol Buffers syntax version (proto2 or proto3)
Package Namemy_packageThe package declaration in the .proto file
Message NameMyMessageThe message type name for the generated definition
Field Type DetectionAuto DetectAnalyze cell values to infer types, or force all fields to string
Indent Size2 spacesIndentation inside the message block

Step 4: Export

Click Convert to generate .proto code. Use Copy to Clipboard or Download File to save as a .proto file.

Key Features

  • Two input modes: Paste Markdown directly or upload a .md file via drag-and-drop

  • Full table editor: Edit, transpose, deduplicate, find-and-replace before converting

  • Proto2 and proto3 support: Choose the syntax version that matches your project

  • Custom package and message names: Configure the .proto file structure

  • Smart type detection: Automatically infer int32, double, bool from cell values

  • Configurable indentation: 2, 4, or 8 spaces

  • Client-side processing: Files never leave the browser — zero data upload

  • Undo/Redo: Full edit history with revert support

  • Context menu: Right-click for quick row/column/cell operations

  • Header toggle: Treat the first row as field names or regular data

  • Validation indicator: Real-time feedback on input validity

What the Output Looks Like

Given this Markdown input:

| field_name | type     | value |
|------------|----------|-------|
| id         | int32    | 1     |
| name       | string   | 2     |
| email      | string   | 3     |
| active     | bool     | 4     |
| score      | double   | 5     |

The tool generates:

syntax = "proto3";

package
my_package;

message
MyMessage {
 int32 id = 1;
 string name = 2;
 string email = 3;
 bool active = 4;
 double score = 5;
}

When Field Type Detection is set to "Auto Detect"

The tool inspects cell values in the data rows and maps them to protobuf scalar types:

Detected PatternProtobuf Type
Integers (e.g., 42, -7)int32
Decimals (e.g., 3.14, -0.5)double
true / falsebool
Everything elsestring

When Field Type Detection is set to "All String"

All fields are generated as string regardless of content:

syntax = "proto3";

package
my_package;

message
MyMessage {
 string field_name = 1;
 string type = 2;
 string value = 3;
}

Understanding Protocol Buffers (.proto) Syntax

Protocol Buffers (protobuf) is Google's language-neutral, platform-neutral extensible mechanism for serializing structured data. You define how you want your data structured in .proto files, then use the protocol compiler (protoc) to generate source code in languages including Java, Python, Go, C++, C#, Ruby, and JavaScript.

Core concepts

  • syntax: Declares the proto version. proto3 is the current default.

  • package: Prevents naming conflicts between different projects.

  • message: Defines a structured data type with typed fields.

  • Field numbers: Each field is assigned a unique number (1–536870911) used in the binary encoding. These numbers must never change once the message is in use.

Scalar value types

Protobuf TypeGoJavaPythonC++
doublefloat64doublefloatdouble
floatfloat32floatfloatfloat
int32int32intintint32
int64int64longint/longint64
uint32uint32intint/longuint32
uint64uint64longint/longuint64
sint32int32intintint32
sint64int64longint/longint64
fixed32uint32intintuint32
fixed64uint64longint/longuint64
sfixed32int32intintint32
sfixed64int64longint/longint64
boolboolbooleanboolbool
stringstringStringstr/unicodestring
bytes[]byteByteStringstrstring

Official reference: Protocol Buffers Language Guide (proto3)

Proto2 vs Proto3: Which Should You Use?

Featureproto2proto3
Syntax declarationsyntax = "proto2";syntax = "proto3";
Default syntax (if omitted)proto2— (must declare)
Required fieldsSupported (required)Not supported
Optional fieldsSupported (optional)All fields are implicitly optional
Default valuesExplicit default keywordZero-value defaults (0, "", false)
Field presence trackingHas hasXxx() methodsOnly tracks non-default values
Enum first valueCan be any valueMust be 0
ExtensionsSupportedNot supported (use Any)
JSON mappingNot built-inNative support
Recommended forLegacy systems, strict validationNew projects, gRPC

Recommendation: Use proto3 for all new projects. It is simpler, has native JSON support, and is the default for gRPC. Use proto2 only when maintaining existing systems that depend on required fields or extensions.

Field Type Detection: Auto Detect vs All String

Auto Detect mode

The tool examines the data rows (not the header) to infer each column's protobuf type:

| name  | age | score | enrolled |
|-------|-----|-------|----------|
| Alice | 30  | 95.5  | true     |
| Bob   | 25  | 88.0  | false    |

Generates:

message MyMessage {
 string name = 1;
 int32 age = 2;
 double score = 3;
 bool enrolled = 4;
}

All String mode

Every column is typed as string, regardless of content:

message MyMessage {
 string name = 1;
 string age = 2;
 string score = 3;
 string enrolled = 4;
}

Use "All String" when your Markdown table contains only field names and descriptions (like a schema specification), not actual data values for type inference.

Use Cases: When to Convert Markdown to Protobuf

ScenarioWhy Convert
gRPC service designConvert API design tables from RFCs into .proto files
API contractsTransform shared specification tables into formal schema definitions
MicroservicesGenerate message types from data models documented in wikis
Data serializationMove documented data structures into protobuf for efficient wire format
Code generationFeed .proto files into protoc to generate stubs in 10+ languages
Database schema migrationConvert tabular schema docs into protobuf messages for NoSQL backends
Team handoffsBridge the gap between product specs (Markdown) and engineering (protobuf)
PrototypingQuickly generate .proto drafts from planning spreadsheets

gRPC Service Example

A product specification written as a Markdown table:

| field    | type   | number |
|----------|--------|--------|
| user_id  | int32  | 1      |
| username | string | 2      |
| email    | string | 3      |

Converts to:

syntax = "proto3";

package
user_service;

message
User {
 int32 user_id = 1;
 string username = 2;
 string email = 3;
}

service UserService {
 rpc GetUser (User) returns (User);
}

Frequently Asked Questions (FAQ)

  • Does this tool upload my files to a server?

    No. All file parsing and conversion runs in your browser using JavaScript. Your data stays on your device. A.Tools never receives, stores, or transmits your file contents.

  • What Markdown table formats are supported?

    The tool supports standard pipe-delimited Markdown tables following the CommonMark specification, including tables with or without leading/trailing pipes and alignment indicators.

  • What does the .proto output look like?

    The tool generates a complete .proto file with a syntax declaration, package statement, and a message definition containing typed fields with unique field numbers. See the "What the Output Looks Like" section above for examples.

  • What is the difference between proto2 and proto3?

    Proto3 is the recommended syntax for new projects. It is simpler — no required fields, no extensions, native JSON mapping, and all fields are implicitly optional. Proto2 supports required/optional keywords and explicit default values. Use proto2 only for legacy systems.

  • How does Field Type Detection work?

    In Auto Detect mode, the tool examines data values in each column and maps integers to int32, decimals to double, true/false to bool, and everything else to string. In All String mode, all fields are typed as string regardless of content.

  • Can I customize the package and message names?

    Yes. Enter any valid Protocol Buffers identifier in the Package Name and Message Name fields. Names should start with a letter and contain only letters, numbers, and underscores.

  • Can I edit the table before converting?

    Yes. After parsing, the full table editor lets you modify cells, add or remove rows and columns, transpose, deduplicate, change text case, and find-and-replace values.

  • Are field numbers automatically assigned?

    Yes. Field numbers are assigned sequentially starting from 1, based on column order. Field numbers are critical in protobuf — once deployed, they must never change.

  • Is there a file size limit?

    Processing is client-side, so the limit depends on your browser's memory. Tables with tens of thousands of rows work reliably on modern browsers.

Featured Tools

Featured tools that you might find useful.

Popular Tools

List of popular tools that users love and frequently use.

New Tools

The latest tools added to our collection, designed for you.

Topics

The tools grouped by topics to quickly find what you need.
Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.

Excel To JSON

Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.
Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.

Excel To CSV

Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.
Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.

Excel To SQL

Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.
Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.

Excel To ASCII Table

Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.