Convert CSV to Properties

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

CSV vs Properties Format Comparison

Aspect CSV (Source Format) Properties (Target Format)
Format Overview
CSV
Comma-Separated Values

Plain text format for storing tabular data where each line represents a row and values are separated by commas (or other delimiters). Universally supported by spreadsheets, databases, and data processing tools. Simple, compact, and human-readable.

Tabular Data Universal
Properties
Java Properties File

A simple key-value configuration format used extensively in Java applications, Spring Boot, Apache projects, and many other frameworks. Each line contains a key=value pair, with support for comments, Unicode escapes, and multi-line values. Properties files are the standard configuration mechanism for Java-based applications.

Configuration Java Standard
Technical Specifications
Structure: Rows and columns in plain text
Delimiter: Comma, semicolon, tab, or pipe
Encoding: UTF-8, ASCII, or UTF-8 with BOM
Headers: Optional first row as column names
Extensions: .csv
Structure: Key=value pairs, one per line
Separators: =, :, or whitespace between key and value
Encoding: ISO 8859-1 (with Unicode escapes)
Comments: # or ! for comment lines
Extensions: .properties
Syntax Examples

CSV uses delimiter-separated values:

Name,Age,City
Alice,30,New York
Bob,25,London
Charlie,35,Tokyo

Properties uses key=value pairs:

# Entry 1
entry.1.Name=Alice
entry.1.Age=30
entry.1.City=New York

# Entry 2
entry.2.Name=Bob
entry.2.Age=25
entry.2.City=London

# Entry 3
entry.3.Name=Charlie
entry.3.Age=35
entry.3.City=Tokyo
Content Support
  • Tabular data with rows and columns
  • Text, numbers, and dates
  • Quoted fields for special characters
  • Multiple delimiter options
  • Large datasets (millions of rows)
  • Compatible with Excel, Google Sheets
  • Key-value string pairs
  • Comment lines (# or !)
  • Unicode escape sequences (\uXXXX)
  • Multi-line values with backslash continuation
  • Hierarchical keys with dot notation
  • Special character escaping
  • Blank line separation for readability
Advantages
  • Smallest possible file size for tabular data
  • Universal import/export support
  • Easy to generate programmatically
  • Works with any spreadsheet application
  • Simple and predictable structure
  • Great for data exchange and ETL
  • Native Java API support (java.util.Properties)
  • Simple and human-readable format
  • Standard configuration for Spring Boot
  • Easy to parse in any programming language
  • Supports inline comments for documentation
  • Version control friendly (plain text)
  • Widely supported across Java ecosystem
Disadvantages
  • No formatting or styling
  • No data types (everything is text)
  • Delimiter conflicts in data
  • No multi-sheet support
  • No metadata or schema
  • Flat key-value structure only (no nesting)
  • No native data types (all values are strings)
  • ISO 8859-1 encoding limitation
  • No array or list support natively
  • Not suitable for complex structured data
Common Uses
  • Data import/export between systems
  • Database bulk operations
  • Spreadsheet data exchange
  • Log file analysis
  • ETL pipelines and data migration
  • Java application configuration
  • Spring Boot application.properties
  • Internationalization (i18n) message bundles
  • Build tool configuration (Maven, Gradle)
  • Database connection parameters
  • Environment-specific settings
Best For
  • Data exchange between applications
  • Bulk data import/export
  • Simple tabular data storage
  • Automation and scripting
  • Java application configuration
  • Internationalization message files
  • Environment variable management
  • Simple key-value data storage
Version History
Introduced: 1972 (early implementations)
RFC Standard: RFC 4180 (2005)
Status: Widely used, stable
MIME Type: text/csv
Introduced: 1995 (Java 1.0, java.util.Properties)
XML Variant: Java 1.5 (2004, XML properties)
Status: Stable, core Java API
MIME Type: text/x-java-properties
Software Support
Microsoft Excel: Full support
Google Sheets: Full support
LibreOffice Calc: Full support
Other: Python, R, pandas, SQL, all databases
Java/JVM: Native java.util.Properties API
Spring Boot: Auto-loading of application.properties
IDEs: IntelliJ, Eclipse, VS Code (syntax support)
Other: Apache Commons Configuration, Python jproperties

Why Convert CSV to Properties?

Converting CSV data to Java Properties format transforms tabular data into key-value configuration files used by Java applications, Spring Boot, and the broader JVM ecosystem. This conversion is essential when you need to generate configuration files from spreadsheet data, create internationalization (i18n) message bundles from translation tables, or build environment-specific settings from structured CSV exports.

Properties files are the standard configuration format for Java applications. Each CSV row is mapped to a set of key-value pairs using dot notation, where column headers become the property name suffix and row identifiers become the prefix. When you convert CSV to Properties, our converter detects the delimiter, identifies headers, and generates properly structured property entries with comments for readability.

This conversion is particularly valuable for DevOps engineers and developers who manage configuration across multiple environments. Export your configuration spreadsheet as CSV (with columns for key, development value, staging value, production value), convert it to Properties format, and deploy environment-specific configuration files. The converter handles special characters, Unicode escaping, and proper formatting automatically.

CSV to Properties conversion is also ideal for building i18n message bundles from translation spreadsheets. If your translators work in Excel or Google Sheets, they can export translations as CSV, and you can convert them to .properties files (messages_en.properties, messages_fr.properties, etc.) for your Java application. This streamlines the localization workflow significantly.

Key Benefits of Converting CSV to Properties:

  • Java Ready: Output follows java.util.Properties format standards
  • Auto-Detection: Automatically detects CSV delimiter (comma, semicolon, tab, pipe)
  • Header as Keys: Column headers become property key suffixes with dot notation
  • Comment Support: Generates # comments for section separation and documentation
  • Spring Boot Compatible: Output works directly as application.properties
  • Unicode Handling: Special characters are properly escaped with \uXXXX notation
  • Data Integrity: All cell values are preserved exactly as in the original CSV

Practical Examples

Example 1: Application Configuration Data

Input CSV file (config.csv):

key,value
server.port,8080
server.host,localhost
database.url,jdbc:mysql://localhost:3306/mydb
database.username,admin
database.password,secret123

Output Properties file (config.properties):

# Generated from config.csv
server.port=8080
server.host=localhost
database.url=jdbc\:mysql\://localhost\:3306/mydb
database.username=admin
database.password=secret123

Example 2: Internationalization Translation Table

Input CSV file (translations.csv):

key,en,fr,de
greeting,Hello,Bonjour,Hallo
farewell,Goodbye,Au revoir,Auf Wiedersehen
thank.you,Thank you,Merci,Danke

Output Properties file (translations.properties):

# Generated from translations.csv

# Entry 1
entry.1.key=greeting
entry.1.en=Hello
entry.1.fr=Bonjour
entry.1.de=Hallo

# Entry 2
entry.2.key=farewell
entry.2.en=Goodbye
entry.2.fr=Au revoir
entry.2.de=Auf Wiedersehen

# Entry 3
entry.3.key=thank.you
entry.3.en=Thank you
entry.3.fr=Merci
entry.3.de=Danke

Example 3: Feature Flags Configuration

Input CSV file (features.csv):

feature,enabled,description,rollout_percentage
dark_mode,true,Enable dark mode UI,100
new_checkout,false,Redesigned checkout flow,25
ai_search,true,AI-powered search results,50

Output Properties file (features.properties):

# Generated from features.csv

# Entry 1
entry.1.feature=dark_mode
entry.1.enabled=true
entry.1.description=Enable dark mode UI
entry.1.rollout_percentage=100

# Entry 2
entry.2.feature=new_checkout
entry.2.enabled=false
entry.2.description=Redesigned checkout flow
entry.2.rollout_percentage=25

# Entry 3
entry.3.feature=ai_search
entry.3.enabled=true
entry.3.description=AI-powered search results
entry.3.rollout_percentage=50

Frequently Asked Questions (FAQ)

Q: What is a Java Properties file?

A: A Java Properties file (.properties) is a simple text-based configuration format used extensively in Java applications. Each line contains a key=value pair, where keys are typically hierarchical using dot notation (e.g., database.url=...). The format is natively supported by Java's java.util.Properties class, Spring Boot, Apache Maven, and many other frameworks. Properties files support comments (# or !), Unicode escapes (\uXXXX), and multi-line values.

Q: How does the CSV delimiter detection work?

A: Our converter uses Python's csv.Sniffer to automatically detect the delimiter used in your CSV file. It supports commas, semicolons, tabs, and pipe characters. The sniffer analyzes a sample of your data to determine the correct delimiter and quoting convention. CSV files from Excel, Google Sheets, databases, or any other source are handled correctly without manual configuration.

Q: How are CSV columns mapped to property keys?

A: The converter uses CSV column headers as property key suffixes, creating hierarchical keys with dot notation. Each CSV row generates a group of properties with a shared prefix (e.g., entry.1, entry.2). For example, a CSV with columns "name" and "email" produces entry.1.name=... and entry.1.email=... for the first data row. This mapping preserves the tabular structure in a flat key-value format.

Q: How are data types handled in Properties files?

A: Properties files store all values as strings, which aligns well with CSV where all values are also text. Numbers, booleans, dates, and other data types are preserved exactly as they appear in the CSV. Java applications typically parse these string values into the appropriate types when reading the properties file (e.g., Integer.parseInt() for numbers, Boolean.parseBoolean() for booleans).

Q: What happens with special characters like = or : in my CSV data?

A: Special characters that have meaning in Properties syntax (=, :, \, and leading whitespace) are properly escaped with backslash in the output. For example, a URL containing colons (jdbc:mysql://...) will be escaped as jdbc\:mysql\://... This ensures the properties file is parsed correctly by Java's Properties class and other compatible parsers.

Q: Can I use the output directly in Spring Boot?

A: Yes! The generated properties file follows the standard format recognized by Spring Boot. You can use it as application.properties or as a custom configuration file. For CSV data with a "key" and "value" column, the converter can generate a flat properties file suitable for direct use in Spring Boot configuration without any modifications.

Q: How does the converter handle Unicode characters?

A: The Java Properties format traditionally uses ISO 8859-1 encoding, requiring non-ASCII characters to be escaped as \uXXXX sequences. Our converter automatically handles this, ensuring that characters like accented letters, CJK characters, or emoji from your CSV data are properly encoded in the properties file. Modern Java versions (9+) also support UTF-8 properties files if explicitly loaded with UTF-8 encoding.

Q: Does the converter support CSV files from Excel?

A: Yes! CSV files exported from Microsoft Excel, Google Sheets, LibreOffice Calc, and other spreadsheet applications are fully supported. The converter handles UTF-8 and UTF-8 with BOM encodings, as well as different line ending styles (Windows CRLF, Unix LF, Mac CR). Both comma-separated and semicolon-separated formats are detected automatically.