Bioinformatics Converter
Convert between various bioinformatics formats instantly
Paste Data
Upload File
Conversion output will appear here...
Was this tool helpful?

Our Phylip to Nexus Converter is a web-based utility designed to streamline the preparation of your multiple sequence alignments for advanced phylogenetic analysis. It efficiently transforms files from the simple, sequential phylip format into the more structured and feature-rich nexus format. This conversion adds essential block-based organization and metadata compatibility, making your data readable by a wide range of sophisticated phylogenetic inference software like MrBayes, BEAST, and PAUP*.
How to use (step-by-step)
Follow these simple steps to convert your file in seconds.
- Upload Your File: Click “Upload File” or drag and drop your
phylipfile directly into the designated area. You can also paste the file’s content using the “Paste Data” option. - Choose Your Formats: The input and output formats are pre-selected for your convenience. Ensure
phylip(PHYLIP format) is set as the input andnexus(NEXUS format) as the output. - Start the Conversion: Press the “Convert File” button to begin the process. The tool will process your file instantly.
- Download Your File: Once the conversion is complete, a download link for your new
.nexfile will appear. Click it to save the file to your device.
Tip: If you see an error during conversion, check the Troubleshooting Guide below—common causes and fixes are listed.
Input, Output, and Key Changes
Understanding the transformation from phylip to nexus is crucial for effective phylogenetic analysis. Here’s a breakdown of the formats and the changes that occur.
Sample input (phylip Format)
The phylip format is a text-based format for representing multiple sequence alignments. It is characterized by its simplicity, with a header line indicating the number of sequences and sites, followed by the sequence names and the corresponding sequence data. It is widely used as an input for many phylogenetic programs.
Example of a phylip file:
5 38
Cow ATGGCATATCCCTCGCTCTGACCACATCCAAAC
Carp ATGGCACACCCCCAGCTCTGACCACATCCAAAC
Chicken ATGGCCAACCCCAGCCCTGACCACATCCAAAC
Human ATGGCACACCCCTCGCTCTGACCACATCCAAAC
Loach ATGGCACACCCCCAGCTCTGACCACATCCAAAC
Sample Output (nexus Format)
The nexus format is a more structured, block-based file format for storing systematic data. It is highly extensible and can store not only sequence alignments but also phylogenetic trees, character state information, and analytical assumptions within a single file, making it a versatile standard for modern phylogenetics.
Example of the same data after conversion:
#NEXUS
BEGIN DATA;
DIMENSIONS NTAX=5 NCHAR=38;
FORMAT DATATYPE=DNA MISSING=N GAP=-;
MATRIX
Cow ATGGCATATCCCTCGCTCTGACCACATCCAAAC
Carp ATGGCACACCCCCAGCTCTGACCACATCCAAAC
Chicken ATGGCCAACCCCAGCCCTGACCACATCCAAAC
Human ATGGCACACCCCTCGCTCTGACCACATCCAAAC
Loach ATGGCACACCCCCAGCTCTGACCACATCCAAAC
;
END;
Key Changes in the Conversion Process
The conversion from phylip to nexus involves restructuring the data to enhance compatibility and functionality:
- Addition of a Block-Based Structure: The alignment is wrapped in
BEGIN DATA;andEND;blocks. This modular structure is the hallmark of thenexusformat, allowing different types of data (e.g., alignments, trees) to be stored in the same file. - Inclusion of Explicit Metadata: The tool adds a
DIMENSIONSline to explicitly state the number of taxa (NTAX) and characters (NCHAR), and aFORMATline to define the data type (e.g.,DNA), missing character symbol, and gap symbol. This removes ambiguity and ensures the data is interpreted correctly by downstream software. - Creation of a
MATRIXCommand: The sequence data is placed within aMATRIXblock, which formally contains the alignment itself. This standardized structure is required by allnexusparsers. - Enhanced Compatibility: By converting to
nexus, the alignment becomes compatible with a broader array of modern phylogenetic software that leverages the format’s ability to store complex datasets and analytical parameters.
Compatible Software
The generated nexus files are ready to be used with the following leading phylogenetic analysis and visualization software:
- MrBayes
- BEAST / BEAST2
- PAUP*
- FigTree
- Mesquite
- SplitsTree
Troubleshooting Guide
Encountering an error can be frustrating, but most issues are easy to fix. Here are the most common problems you might face and how to resolve them.
General Tool Errors
Error: “File size exceeds the limit”
- Why it happens: Your uploaded file is larger than the maximum allowed size (25 MB). Our server has this limit to ensure quick processing for all users.
- How to fix: For very large alignments, consider filtering out uninformative sites or splitting your dataset if appropriate. For processing larger files, please contact us for custom solutions.
Error: “Processing timed out”
- Why it happens: The conversion is taking too long, which can occasionally happen with exceptionally large files.
- How to fix: Please try uploading the file again. If the issue persists, verify that your file format is correct. If the file is valid and continues to time out, please contact us to discuss options.
Error: “CAPTCHA validation failed”
- Why it happens: Our system uses a CAPTCHA to prevent automated bots. This error occurs if the CAPTCHA was not solved correctly or timed out.
- How to fix: Simply reload the page and solve the new CAPTCHA. If you continue to have trouble after reloading, please get in touch with our support team.
Conversion-Specific Errors
These errors typically relate to the formatting of the data within your phylip file.
Error: “Mismatched sequence count or length”
- Why it happens: The numbers in the first line of the
phylipfile (e.g.,5 38) do not match the actual number of sequences or the length of the aligned sequences found in the file. - How to fix: Open your
phylipfile in a text editor. Manually count the number of sequences and the number of characters in each sequence. Correct the two numbers on the first line to accurately reflect the file’s contents.
Error: “Invalid sequence name format”
- Why it happens: The strict
phylipformat often expects sequence names to be a fixed length (typically 10 characters) and free of special characters or internal spaces. A name that is too long or improperly formatted can cause the parser to fail. - How to fix: Edit your
phylipfile to ensure all sequence names are 10 characters or fewer and contain only alphanumeric characters and underscores. If names are shorter than 10 characters, ensure they are followed by the correct number of spaces before the sequence begins.
Error: “Parser error: cannot read alignment”
- Why it happens: This can be caused by a malformed file, such as mixing interleaved and sequential
phylipformats, or by having blank lines within the alignment block. The parser expects a continuous block of sequences after the header. - How to fix: Ensure your file is consistently formatted as either sequential or interleaved. Remove any blank lines between the sequence entries. Re-exporting the alignment from your sequencing software (e.g., MEGA, AliView) can often clean up these formatting issues.
If your problem isn’t listed here, we want to know about it! Please help us improve the tool by reporting the issue.
Support Our Work
We are committed to keeping our scientific tools free and accessible for everyone. If this tool has been helpful in your work, please consider supporting our mission with a donation. Your support directly helps us cover server costs and fund the development of new, powerful tools for the scientific community.
References & Suggested Reading
This tool was developed in line with established principles in bioinformatics and computational biology. The resources listed below are foundational papers and key publications that define the file formats and software relevant to this conversion, and we highly recommend them for a deeper understanding of the scientific principles.
- Maddison, D. R., Swofford, D. L., & Maddison, W. P. (1997). NEXUS: an extensible file format for systematic information. Systematic Biology, 46(4), 590–621. https://doi.org/10.1093/sysbio/46.4.590
- Cock, P. J., Antao, T., Chang, J. T., Chapman, B. A., Cox, C. J., Dalke, A., … & de Hoon, M. J. (2009). Biopython: freely available Python tools for computational molecular biology and bioinformatics. Bioinformatics, 25(11), 1422–1423. https://doi.org/10.1093/bioinformatics/btp163
- Ronquist, F., Teslenko, M., van der Mark, P., Ayres, D. L., Darling, A., Höhna, S., … & Huelsenbeck, J. P. (2012). MrBayes 3.2: efficient Bayesian phylogenetic inference and model choice across a large model space. Systematic biology, 61(3), 539–542. https://doi.org/10.1093/sysbio/sys029
- Suchard, M. A., Lemey, P., Baele, G., Ayres, D. L., Drummond, A. J., & Rambaut, A. (2018). Bayesian phylogenetic and phylodynamic data integration using BEAST 1.10. Virus Evolution, 4(1), vey016. https://doi.org/10.1093/ve/vey016