On your Mac, go to the Apple menu by clicking on the apple icon at the top-left of the screen and select ‘System Preferences'. Then select Keyboard and from there click on Input Sources.
Click the plus button at the bottom left of the window, type “Japanese,” select it from the list, and add it.
Be sure that “Show Input menu in menu bar” is selected.
At the top right of your screen, you will see an American flag if your input method is American English (or another flag or symbol if your default keyboard is from another language). Click here to change your input to Japanese and select from romaji, hiragana or katakana.
Once the Japanese Language Pack has finished installing, you can hit Ctrl + Space to toggle languages from your default language to Japanese.