.FTL

FTL File

FreeMarker Template Language File
Ask a question
QUICK ANSWER

An FTL file is an Apache FreeMarker template - a plain text file mixing static content (HTML, XML, etc.) with directives and expressions that a Java application processes to produce output. Open it in VS Code or IntelliJ IDEA to edit it. To render it you need a Java project with the FreeMarker library.

Developer: Attila Szegedi (original); The FreeMarker Project; Apache Software Foundation (since 2015) Category: Developer Files Open standard MIME: text/plain
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Jun 28, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the FTL file format?

.ftl is a FreeMarker Template Language file - a plain-text template processed by the Apache FreeMarker Java template engine. FreeMarker runs on the JVM and merges static output content (HTML, XML, plain text, SQL, source code, emails) with FTL directives and expressions to produce final text output server-side.

A .ftl file mixes three kinds of syntax: directives such as <#if>, <#list>, <#include>, <#macro>, and <#assign>; interpolations written as ${expression}; and FTL comments in the form <#-- comment -->. Everything outside these constructs is passed through unchanged to the output.

An optional <#ftl> header directive at the top of the file can declare the file encoding, output format, auto-escaping rules, and whitespace handling. Without it, FreeMarker applies the encoding and settings configured globally in the calling Java application.

Two specialised variants exist alongside .ftl: .ftlh triggers HTML auto-escaping and .ftlx triggers XML auto-escaping, both introduced in FreeMarker 2.3.24. These reduce cross-site scripting risk without requiring explicit escaping calls in every template.

FreeMarker is widely used in Java web frameworks such as Spring MVC, Apache Struts, and Play Framework, as well as code-generation pipelines and document templating systems. The project moved to the Apache Software Foundation in 2015; the current release is FreeMarker 2.3.34 (2024). VS Code and IntelliJ IDEA both support FTL syntax highlighting via plugins.

Security & safety

RISK: LOW

FTL templates are plain text files - safe to open in any text editor. Templates run server-side on the JVM; there is no client-side execution. Malicious templates could potentially execute harmful FreeMarker directives (e.g., <#assign exec="freemarker.template.utility.Execute"?new()>) if template rendering runs with insecure configuration - this is a server-side server misconfiguration issue (Server-Side Template Injection / SSTI), not a risk to end users opening the file.

Format details

in a nutshell
FULL NAMEFreeMarker Template Language Fileaka FTL template, FreeMarker template
DEVELOPERAttila Szegedi (original); The FreeMarker Project; Apache Software Foundation (since 2015)since circa 2002 (FreeMarker first release)
MIME TYPEtext/plain
TYPEPlain text template file (FTL syntax - HTML/text with FreeMarker directives and interpolations)
STANDARDOpen · royalty-free

Programs that open FTL files

Windows3 apps
IntelliJ IDEA Freemium IntelliJ IDEA (Ultimate) has built-in FreeMarker support: syntax highlighting, code completion, error detection for .ftl files in Java projects.
VS Code Free Open .ftl file directly; install 'FreeMarker' extension from Marketplace for syntax highlighting. No processing - editing only.
FreeMarker (Java library / CLI) Open-source FreeMarker is a Java library, not a standalone app. To process an .ftl file, include freemarker.jar in a Java project and call: new Configuration(); Template t = cfg.getTemplate("template.ftl"); t.process(dataModel, writer).
macOS3 apps
IntelliJ IDEA Freemium Full FreeMarker IDE support in IntelliJ IDEA Ultimate on macOS.
VS Code Free Same as Windows - install FreeMarker extension from VS Code Marketplace.
FreeMarker (Java library) Open-source Same as Windows - Java library for template processing.
Linux2 apps
VS Code Free Available on Linux; FreeMarker extension from Marketplace.
FreeMarker (Java library) Open-source Available via Maven (org.freemarker:freemarker:2.3.34) or apt/dnf package managers (java-based).

Technical details

deep spec
Template syntax styleDirective-based: `<#tag>` directives + `${expression}` interpolations mixed into static content
Default encodingUTF-8 default; can be overridden via the encoding attribute in the optional `<#ftl>` header directive at file top
Execution environmentJava Virtual Machine (JVM); processed server-side by the FreeMarker library
Output formatAny text format - HTML, XML, plain text, SQL, source code, email bodies
Directive categoriesFlow control (`<#if>`, `<#list>`), assignment (`<#assign>`, `<#local>`), definition (`<#macro>`, `<#function>`), inclusion (`<#include>`, `<#import>`)
Interpolation syntax`${expression}` (string/number); `#{number}` supported as legacy numeric interpolation
Comment syntax`<#-- comment -->` - stripped entirely from rendered output
Header directiveOptional `<#ftl>` at file top; sets encoding, output_format, auto_esc, strip_whitespace, attributes
Auto-escaping variants`.ftlh` (HTML auto-escape) and `.ftlx` (XML auto-escape) - introduced FreeMarker 2.3.24
Data model accessJava objects passed as a map from the calling application; templates read but cannot modify the model
Whitespace controlConfigurable `strip_whitespace`; fine-grained control with `<#t>`, `<#lt>`, `<#rt>` directives per line
Template reuse`<#include>` for literal inclusion; `<#import>` for namespace-scoped macro/function libraries
Typical file size1 KB - 200 KB per template file
Releasedcirca 2002 (FreeMarker first release)
Latest versionFreeMarker 2.3.34 (2024); hosted at Apache
Open standardYes · royalty-free
Specificationfreemarker.apache.org

FTL conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with FTL files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about FTL files.

Frequently asked questions

What is an FTL file?
An FTL file is an Apache FreeMarker template - a text file containing HTML (or XML/text/etc.) mixed with FreeMarker directives and expressions. A Java application processes it with a data model to produce the final output.
How do I open and edit an FTL file?
Use VS Code (with the FreeMarker extension) or IntelliJ IDEA for syntax highlighting. Any text editor works for basic editing - FTL files are plain UTF-8 text.
How do I process/render an FTL template?
Add freemarker.jar to your Java project (Maven: org.freemarker:freemarker:2.3.34), create a Configuration, load the template, and call template.process(dataModel, outputWriter). FreeMarker is a Java library, not a standalone tool.
Can I convert an FTL file to HTML directly?
Only by rendering it with FreeMarker and a data model. Without the data model (the variable values), you cannot produce valid HTML output - the template is incomplete by itself.
What is the difference between .ftl, .ftlh, and .ftlx?
.ftl is the base extension (no automatic escaping). .ftlh enables HTML auto-escaping (prevents XSS). .ftlx enables XML auto-escaping. Use .ftlh for all web HTML templates (FreeMarker 2.3.24+).
Is FreeMarker the same as Velocity (.vm files)?
No - FreeMarker and Apache Velocity are separate Java template engines with similar purposes but different syntax. FreeMarker (.ftl) uses <#directive> syntax; Velocity (.vm) uses #directive syntax.

References

1Apache FreeMarker - Official site and manualfreemarker.apache.org
2FreeMarker Manual - Template Language Referencefreemarker.apache.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.RPMSGRestricted Permission Message
6.MDMarkdown Document
7.NOMEDIAAndroid No-Media Marker File
8.PRO6XProPresenter 6 Bundle File
9.EXEWindows Executable (Portable Executable)
10.PRDXSoftMaker Presentations Document

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z