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)
Answer from hitz on Stack Overflowconfiguration - How to import .XML code style into IntelliJ Idea 15 - Stack Overflow
java - How to import code style scheme on Intellij from outside the IDE - Stack Overflow
How to properly import Java code style settings with IntelliJ? - Stack Overflow
java - Importing code style formatting settings into eclipse from intellij-idea - Stack Overflow
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.
I couldn't find a ready plugin for that in 2018. So here is a side by side code style configuration from UI perspective of Intellij IDEA 2017.3 and Eclipse OXYGEN.3 March 2018. If both configured this way the code will be formatted close enough, so for example github will show you code differences so that it make sense.
For our project we configured one XML for each IDE so they more or less match:
- IntelliJ Config File is default of IDEA 2017.3 so not much to define in XML - enter link description here
- Eclipse Config is modified a bit from the default to match IntelliJ - link
- Here is also a PDF file to show all the options set in both IDEs side by side - link
There is also a project to solve this problem across more IDEs(Answer) : EditorConfig
There is a EditorConfig - independent format for editors/IDEs code style configuration. There are EditorConfig plugins for most popular editors(see full list here).
You can see examples for IntelliJ IDEA(tutorial) and Eclipse(plugin page).
In addition to @Dmitry Durkin answer.
You have to manually create new formatter(and/or clean up) profile which matches the one to one settings inside settings.jar. Hoping eclipse provides all the one to one mapping. Not take much time.
In eclipse go to Window > Preferences. Navigate to Java > Code style > Formatter. Here create new formatter which matches the settings in settings.jar.
Use this new formatter profile to create new clean up profile in Java > Code style > Cleanup for additional settings like Removing trailing spaces etc.
Right click on your project(s) and go to Source > Clean up or Source > Format. To clean up/format all your project(s) in one go.
Eclipse does not support settings.jar from IntelliJ IDEA.
AFAIK there are no easy way to convert Idea code style settings (the actual code.style.schemes.xml file inside settings.jar) to eclipse. You have to migrate it somehow, probably with the help of 3rd party plugins.
Does anyone have any suggestions or tips? Thank you guys.