How to open a .clj file
Quick, free ways to open Clojure on any system.
A .clj file is a Clojure Source File. If double-clicking does nothing, your computer simply does not have an app that reads Clojure yet. Here is how to fix that on each operating system, using free software wherever possible.
Open a .clj file step by step
- Confirm the file really is a .clj. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
- On Windows, open it with VS Code (Calva) or IntelliJ IDEA (Cursive).
- On Mac, use VS Code (Calva) or IntelliJ IDEA (Cursive).
- On Linux, try VS Code (Calva) or Emacs (CIDER).
- Still stuck? Search for a dedicated Clojure viewer.
Best apps to open .clj files
Windows
- VS Code (Calva)
- IntelliJ IDEA (Cursive)
- any text editor
macOS
- VS Code (Calva)
- IntelliJ IDEA (Cursive)
- any text editor
Linux
- VS Code (Calva)
- Emacs (CIDER)
- any text editor
!
Before you open it: Caution. A .clj file is program source that runs on the JVM. Review unfamiliar code before running it.
Frequently asked questions
Why can't I open my .clj file?
Almost always because no installed app understands Clojure. Install one of the apps above, or convert the file to a format your existing software already reads.
How do I run a .clj file?
Use the Clojure CLI (clojure -M file.clj) or a REPL, or run it inside a project with Leiningen or deps.edn tooling.
Is Clojure a Lisp?
Yes. Clojure is a modern Lisp dialect on the JVM, using S-expressions and treating code as data, with a strong focus on immutability.