Convert TSV to Properties
Max file size 100mb.
TSV vs Properties Format Comparison
| Aspect | TSV (Source Format) | Properties (Target Format) |
|---|---|---|
| Format Overview |
TSV
Tab-Separated Values
Plain text format for storing tabular data where columns are separated by tab characters. Clipboard-native format used extensively in bioinformatics and scientific computing. Simpler than CSV because tab characters rarely appear in data, eliminating quoting issues entirely. Tabular Data Clipboard-Native |
Properties
Java Properties File
Simple key-value configuration format used primarily in Java applications. Each line contains a key=value or key:value pair. Supports comments with # or !, Unicode escapes, and line continuation with backslash. Widely used for application configuration and internationalization (i18n). Configuration Key-Value |
| Technical Specifications |
Structure: Rows and columns in plain text
Delimiter: Tab character (U+0009) Encoding: UTF-8, ASCII, or UTF-16 Headers: Optional first row as column names Extensions: .tsv, .tab |
Structure: Key=value pairs, one per line
Separator: = or : between key and value Encoding: ISO 8859-1 (Latin-1) with Unicode escapes Comments: # or ! prefix for comment lines Extensions: .properties |
| Syntax Examples |
TSV uses tab-separated values: key value app.name MyApplication app.version 2.1.0 db.host localhost db.port 5432 |
Properties uses key=value pairs: # Application Configuration app.name=MyApplication app.version=2.1.0 db.host=localhost db.port=5432 |
| Content Support |
|
|
| Advantages |
|
|
| Disadvantages |
|
|
| Common Uses |
|
|
| Best For |
|
|
| Version History |
Introduced: 1993 (IANA registration)
Standard: IANA text/tab-separated-values Status: Widely used, stable MIME Type: text/tab-separated-values |
Introduced: 1995 (Java 1.0)
Standard: Java SE specification Status: Stable, widely adopted MIME Type: text/x-java-properties |
| Software Support |
Microsoft Excel: Full support
Google Sheets: Full support LibreOffice Calc: Full support Other: Python, R, pandas, all text editors |
Java SE: Native (java.util.Properties)
Spring Framework: Full support IDEs: IntelliJ, Eclipse, VS Code Other: Apache Commons, Maven, Gradle |
Why Convert TSV to Properties?
Converting TSV data to Java Properties format transforms tabular key-value data into the standard configuration file format used by Java applications and frameworks. TSV files are ideal for managing configuration data in spreadsheets -- you can maintain keys and values in two columns, easily edit them, and then convert to .properties format for deployment.
TSV's clipboard-native nature makes it perfect for this workflow: copy configuration entries from a spreadsheet, paste them into a text file, and convert to Properties format. Unlike CSV, TSV avoids quoting issues when values contain commas, which is common in configuration strings like connection URLs or comma-separated lists.
Our converter reads the TSV file, uses the first column as property keys and the second column as values, and generates a properly formatted .properties file. Special characters are escaped according to the Properties specification, and Unicode characters are converted to \uXXXX escape sequences when necessary. Comments can be optionally included from additional columns.
This conversion is especially useful for DevOps teams managing configuration across environments, developers preparing internationalization (i18n) resource bundles from translation spreadsheets, and anyone who maintains application settings in spreadsheet form before deploying them as Properties files in Java applications.
Key Benefits of Converting TSV to Properties:
- Configuration Ready: Generates valid .properties files for Java applications
- Spreadsheet Workflow: Maintain configs in spreadsheets, deploy as Properties
- No Quoting Issues: TSV handles commas in values without quoting complexity
- Unicode Support: Proper \uXXXX escape sequences for non-ASCII characters
- i18n Ready: Perfect for generating internationalization resource bundles
- Spring Compatible: Output works with Spring Boot application.properties
- Special Character Escaping: Properly escapes =, :, and whitespace in keys
Practical Examples
Example 1: Application Configuration
Input TSV file (app_config.tsv):
key value app.name MyWebApplication app.version 3.2.1 server.port 8080 server.host 0.0.0.0 db.url jdbc:postgresql://localhost:5432/mydb
Output Properties file (app_config.properties):
# Generated from app_config.tsv app.name=MyWebApplication app.version=3.2.1 server.port=8080 server.host=0.0.0.0 db.url=jdbc\:postgresql\://localhost\:5432/mydb
Example 2: Internationalization Resource Bundle
Input TSV file (messages_fr.tsv):
key value greeting.hello Bonjour greeting.goodbye Au revoir error.notfound Page non trouvée error.forbidden Accès refusé button.submit Soumettre
Output Properties file (messages_fr.properties):
# Generated from messages_fr.tsv greeting.hello=Bonjour greeting.goodbye=Au revoir error.notfound=Page non trouv\u00e9e error.forbidden=Acc\u00e8s refus\u00e9 button.submit=Soumettre
Example 3: Database Connection Settings
Input TSV file (db_settings.tsv):
key value spring.datasource.url jdbc:mysql://db.example.com:3306/production spring.datasource.username app_user spring.datasource.password s3cur3P@ss! spring.datasource.driver-class-name com.mysql.cj.jdbc.Driver spring.jpa.hibernate.ddl-auto validate
Output Properties file (db_settings.properties):
# Generated from db_settings.tsv spring.datasource.url=jdbc\:mysql\://db.example.com\:3306/production spring.datasource.username=app_user spring.datasource.password=s3cur3P@ss\! spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.jpa.hibernate.ddl-auto=validate
Frequently Asked Questions (FAQ)
Q: What is a Java Properties file?
A: A Java Properties file is a simple text-based configuration format that stores key-value pairs, one per line, separated by = or : characters. It is natively supported by Java's java.util.Properties class and widely used in Java applications, Spring Boot, Maven, and Gradle for application configuration, internationalization, and environment settings.
Q: How does the converter map TSV columns to Properties?
A: The converter uses the first column of your TSV file as property keys and the second column as property values. If your TSV has a header row with "key" and "value" labels, those are recognized and excluded from the output. Additional columns beyond the first two are ignored. This two-column approach maps naturally to the key=value structure of Properties files.
Q: How are special characters handled?
A: The converter properly escapes special characters according to the Properties file specification. Characters like =, :, and leading whitespace in keys are escaped with backslashes. Non-ASCII Unicode characters are converted to \uXXXX escape sequences to ensure compatibility with the ISO 8859-1 encoding that Properties files traditionally use.
Q: Can I use this for Spring Boot configuration?
A: Absolutely! The generated .properties file is fully compatible with Spring Boot's application.properties format. You can maintain your Spring configuration in a spreadsheet (which exports as TSV), convert it, and use the output directly as your application.properties or environment-specific configuration file.
Q: Why use TSV instead of CSV for this conversion?
A: TSV is preferred because configuration values often contain commas (e.g., JDBC URLs, comma-separated lists), which would require quoting in CSV format. With TSV, tabs are the delimiter, so commas in values cause no issues. Additionally, TSV is the format you get when copying from spreadsheets, making the workflow seamless.
Q: Does the converter support multi-line property values?
A: The converter generates single-line property values from each TSV row. If your original data contains line breaks within a cell, they will be converted to \n escape sequences in the Properties output, maintaining the data while keeping the Properties file valid and readable.
Q: Can I generate i18n resource bundles from TSV?
A: Yes! This is one of the most common use cases. Translation teams often work in spreadsheets with key-value pairs. Export the spreadsheet as TSV, convert to Properties, and you have a ready-to-use resource bundle (e.g., messages_en.properties, messages_fr.properties) for Java internationalization.
Q: What happens if my TSV has more than two columns?
A: Only the first two columns are used for the key=value mapping. Additional columns are not included in the Properties output. If you need to include comments or metadata, consider restructuring your TSV to have keys in column 1 and values in column 2 before conversion.