Looking for IDE global settings under Ubuntu led me to ~/.IntelliJIdea2019.3/config/ folder.
It contains various IDE files, among which codestyles and jba_config/codestyles (according to Advanced configuration - Help | IntelliJ IDEA, the latter exists if you are using IDE settings sync).
You should then be able to simply replace the Default.xml configuration directly from within file system.
If your XML is previously exported Intellij you can simply do:
File > Import Settings > select your xml
If its custom defined, one you can try copying your xml to intellij config directory:
config/codestyles
Assuming your xml is in format intellij can understand, it will then show up in
Code Styles > Manage
If your XML is in different format, try to match tags with one of pre-defined styles(also XML)
For users coming here for the same issue but recent IntelliJ version (like 20), it is a bit different now. Once you've exported your formatter in XML, then follow these steps:
- Go to Preferences
- Select Editor
- Sele Code Style
- Select the language of your choice (eg Java)
- Go to Scheme at the top, click on the setting button by the side
- Select the option to import scheme, choose your formatter type and select the xml file. Then save and apply.

If you see error "IntelliJ IDEA code style XML import failed with error message: null", check to ensure your XML file has the file definition <?xml version="1.0" encoding="UTF-8"?> at the top.
NOTE: This is for MacBook. I believe the difference won't be much in other platforms.
EDITED The file from Google uses an old (I suppose) key for filetype (java instead of Java). I have made the following changes and it works.
<ADDITIONAL_INDENT_OPTIONS fileType="JAVA">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="8" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
I have made a fork of the GitHub repository with the file corrected (https://github.com/nhenneaux/styleguide/blob/gh-pages/intellij-java-google-style.xml).
The easiest way is to import the style file into ~/.IntelliJIdea2016.2/config/codestyles. Then you have to restart Intellij and go in the style settings to select GoogleStyle.

It seems that the format used in the configuration file differes from what IntelliJ (at least the version I'm using) expects.
I changed my code setting, exported them and looked for differences.
The ident setting were in the output file like so:
<code_scheme name="MyTestStyle">
...
<codeStyleSettings language="JAVA">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="8" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
Importing this file worked as expected.
Go to Eclipse's Preferences → Java → Code Style → Formatter and export the settings to an XML file via the Export All button (or Edit and then Export in dialog that opens up). Then open IntelliJ IDEA Settings → Code Style → Java, click Manage, and import that XML file by simply clicking Import.
As of IntelliJ IDEA 13, there is no possibility to import .settings/.prefs files directly.
Edit: IntelliJ can import the following Eclipse properties:
- General
- Right margin, Formatter on/off tags
- Indentation
- Indent size
- Usage of ‘Tab’ character
- Usage of Tab only for leading indentation (Smart Tabs)
- Indent ‘case’ branches from ‘switch’
- Indent class members
- Keep comment at first column
- Spaces (Java)
- Before/after comma (as set for Eclipse method declaration parameters)
- After comma in type arguments
- Within array initializer braces
- Within brackets (in array reference)
- Within parentheses of: annotation, ‘for’, ‘if’, ‘catch’ ’while’, ’switch’, method, empty method, parenthesized expression, method call, type cast, ‘synchronized’
- Before parentheses of: ‘try’, ‘for’, ’while’, ‘switch’, method, ’if’, ‘catch’, method, method call, ‘synchronized’.
- After type cast
- Around unary, assignment operators (if it’s set for ‘before’ and ‘after’ in Eclipse).
- Before opening brace of: array initializer, ‘switch’
- Before ‘?’ in conditional expression
- Space before/after ‘:’ in conditional expression
- Space around binary operators (a single Eclipse setting is mapped to multiple IntelliJ IDEA’s settings)
- Blank lines
- Around fields and methods
- Before/after package
- Before/after imports
- Before method body
- Keep blank lines in code (number of empty lines to preserve)
- Wrapping
- New line before: closing brace in array initializer, ‘else’ in ‘if’ statement, ‘finally’ and ‘catch’ in ‘try’ statement, binary operator (if wrapped)
- New line after: opening brace in array initializer Special ‘else if’ treatment (compact ‘else if’)
- Keep simple blocks in one line
- Keep control statements in one line
- Alignment of: array initializer expressions, arguments in method declarations and calls, field declarations, extends list, assignments, binary expressions, ‘throws’ clause, resources in ‘try’.
- Brace style for: code blocks, methods and classes
- JavaDoc
- Enable JavaDoc formatting
- Blank lines in JavaDoc
In the latest (2020) IntelliJ IDEA, if you have the "Eclipse interoperability" plugin installed, it's as simple as:
Settings > Editor > Code Style > Java > ⚙️ > Import Scheme > Eclipse XML Profile
