It is important to use a text editor which uses the UTF-8 character set (most do nowadays) for compatibility. Some editors have a bunch of useful features, eg. Syntax Highlighting and Linting, and some others can be expanded via addons. Here are some free options for you to research and consider:
Cross-Platform (Windows, Mac, Linux)
- Sublime Text
- ZeroBrane Studio is a lightweight Lua IDE with code completion, syntax highlighting, code analyzer, live coding, and debugging support. Free download, but the developers ask you to donate (click "Take me to the download page this time" on the first download page to download without paying)
- Geany is a text editor using the GTK2 toolkit with basic features of an integrated development environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. It supports many filetypes and has some nice features.
- Atom is a free text editor with syntax highlighting for tons of languages (including Lua and JSON), snippets, code folding, and a bunch of other features. It is also deeply customizable, which means that users can extend the editor even more by creating packages (plugins) for it or installing packages from Atom's package manager from within the editor's settings/preferences menu.
- Visual Studio Code